Running XL C/C++ programs

Canceling execution
Setting runtime options
Running compiled applications on other systems

The default file name for the program executable file produced by the XL C/C++ compiler is a.out. You can select a different name with the -o compiler option.

You can run a program by entering the name of a program executable file together with any runtime arguments on the command line.

You should avoid giving your program executable file the same name as system or shell commands, such as test or cp, as you could accidentally execute the wrong command. If you do decide to name your program executable file with the same name as a system or shell command, you should execute your program by specifying the path name to the directory in which your program executable file resides, such as ./test.

Canceling execution

To suspend a running program, press the Ctrl+Z key while the program is in the foreground. Use the fg command to resume running.

To cancel a running program, press the Ctrl+C key while the program is in the foreground.

Setting runtime options

You can use environment variable settings to control certain runtime options and behaviors of applications created with the XL C/C++ compiler. Other environment variables do not control actual runtime behavior, but can have an impact on how your applications run.

For more information on environment variables and how they can affect your applications at runtime, see Environment variables and XL C/C++.

Running compiled applications on other systems

If you want to run an application developed with the XL C/C++ compiler on another system that does not have the compiler installed, you will need to install a runtime environment on that system.

You can obtain the latest XL C/C++ Runtime Environment install images, together with licensing and usage information, from the Download section on the XL C/C++ Support page at:

www.ibm.com/software/awdtools/xlcpp/support