Running your compiled application

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.

To run a program, enter the name of the program executable file together with any run time 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 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 will run.

For more information on environment variables and how they can affect your applications at run time, see the XL C/C++ Installation Guide.

Running compiled applications on other systems

In general, applications linked on a system using an earlier version of AIX® will run with more recent versions of AIX. However, applications linked on a system using a newer version of AIX will not necessarily run with earlier versions of AIX.

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 PTF images, together with licensing and usage information, from the XL C/C++ Support page at:
www.ibm.com/software/awdtools/xlcpp/support