c

Option Type Default Value #pragma options C C++
-flag - - x x

Syntax

    -c 

Purpose
Instructs the compiler to pass source files to the compiler only.

Notes
The compiled source files are not sent to the linkage editor. The compiler creates an output object file, file_name.o, for each valid source file, file_name.c or file_name.i.

The -c option is overridden if either the -E, -P, or -qsyntaxonly options are specified.

The -c option can be used in combination with the -o option to provide an explicit name of the object file that is created by the compiler.

Example
To compile myprogram.c to produce an object file myfile.o, but no executable file, enter the command:

xlC myprogram.c -c

To compile myprogram.c to produce the object file new.o and no executable file, enter:

xlC myprogram.c -c -o new.o


List of Batch Compiler Options and Their Defaults
Options that Specify Compiler Output
Equivalent Batch Compile-Link and Incremental Build Options