Invoking the C/C++ Compiler

To invoke the compiler, enter:

cl6x[options] [filenames] [--run_linker [link_options] object files]]
cl6x Command that runs the compiler and the assembler.
options Options that affect the way the compiler processes input files. The options are listed in Table 3-6 through Table 3-29.
filenames One or more C/C++ source files, assembly language source files, and linear assembly files.
--run_linker (-z) Option that invokes the linker. The --run_linker option's short form is -z. See Section 6 for more information.
link_options Options that control the linking process.
object files Names of the object files for the linking process.

The arguments to the compiler are of three types:

The --run_linker option indicates linking is to be performed. If the --run_linker option is used, any compiler options must precede the --run_linker option, and all link options must follow the --run_linker option.

Source code filenames must be placed before the --run_linker option. Additional object file filenames can be placed after the --run_linker option.

For example, if you want to compile two files named symtab.c and file.c, assemble a third file named seek.asm, and link to create an executable program called myprogram.out, you will enter:

cl6x symtab.c file.c seek.asm --run_linker --library=lnk.cmd --output_file=myprogram.out