Invoking the compiler

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

Read syntax diagramSkip visual syntax diagram
               .-------------------------------------------.   
               V                                           |   
>>-invocation----+----------------------+--+-------------+-+---><
                 '-command_line_options-'  '-input_files-'     

The parameters of the compiler invocation command can be names of input files, compiler options, and linkage-editor options. Compiler options perform a wide variety of functions such as setting compiler characteristics, describing object code and compiler output to be produced, and performing some preprocessor functions.

To compile without binding, 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 binder is not invoked. You can bind the object files later using the invocation command, specifying the object files without the -c option.

Notes:
  1. Any object files produced from an earlier compilation with the same name as expected object files in this compilation are deleted as part of the compilation process, even if new object files are not produced.
  2. By default, the invocation command calls both the compiler and the binder. It passes binder options to the binder. Consequently, the invocation commands also accept all binder options.