Invoke the Compiler

The IBM XL C/C++ compiler is invoked using the following syntax, where invocation can be replaced with any valid XL C/C++ invocation command:


Syntax Diagram

The parameters of the compiler invocation command can be the names of input files, compiler options, and linkage-editor options. For C++ compiles, the parameters can also include munch options to pass to the munch utility.

Compiler options perform a wide variety of functions, such as setting compiler characteristics, describing the object code and compiler output to be produced, and performing some preprocessor functions.

To compile without link-editing, use the -c compiler option. The -c option stops the compiler after compilation is completed and produces as output, an object file file_name.o for each file_name.c input source file, unless the -o option was used to specify a different object filename. The linkage editor is not invoked. You can link-edit the object files later using the same invocation command, specifying the object files without the -c option.

Note:
By default, the invocation command calls both the compiler and the linkage editor. It passes linkage editor options to the linkage editor. Consequently, the invocation commands also accept all linkage editor options.

Related Concepts

Compiler Modes


Related Tasks

Specify Compiler Options
Invoke the Linkage Editor


Related References

Compiler Command Line Options
Message Severity Levels and Compiler Response
Resolving Conflicting Compiler Options IBM Copyright 2003