Invoking the compiler

Different forms of the XL C/C++ compiler invocation commands support various levels of the C and C++ languages. In most cases, you should use the xlc++ command to compile your C++ source files, and the xlc command to compile C source files. Use xlc++ to link if you have both C and C++ object files.

You can use other forms of the command if your particular environment requires it. The various compiler invocation commands are:

Basic Special
xlC xlC_r
xlc++ xlc++_r
xlc xlc_r
cc cc_r
c99 c99_r
c89 c89_r

XL C/C++ provides _r variations on the basic compiler invocations, as described below:

Table 2. Suffixes for special invocations
_r-suffixed invocations All _r-suffixed invocations allow for thread-safe compilation and you can use them to link the programs that use mullti-threading. They additionally define the macro names __VACPP_MULTI__ and REENTRANT, and add the library -lpthread. The compiler option -qthreaded is also added. Use these commands if you want to create threaded applications.

Related information