You can specify the following types of output files when invoking
the
XL C/C++ compiler:
- Executable files
- By default, executable files are named a.out. To name the executable
file something else, use the -o file_name option with
the invocation command. This option creates an executable file with
the name you specify as file_name. The name you specify can
be a relative or absolute path name for the executable file.
The format of the a.out file is described in the AIX® Files
Reference.
- Object files
- If you specify the -c option, an output object file, file_name.o,
is produced for each input file. The linker is not invoked, and the
object files are placed in your current directory. All processing
stops at the completion of the compilation. The compiler gives object
files a .o suffix, for example, file_name.o,
unless you specify the -o file_name option, giving a
different suffix or no suffix at all.
You can link the object
files later into a single executable file by invoking the compiler.
- Shared library files
- If you specify the -qmkshrobj option, the compiler generates
a single shared library file for all input files. The compiler names
the output file shr.o,
unless you specify the -o file_name option, and give
the file a .so suffix.
- Assembler files
- If you specify the -S option, an assembler file, file_name.s,
is produced for each input file.
You can then assemble the assembler
files into object files and link the object files by reinvoking the
compiler.
- Preprocessed source files
- If you specify the -P option, a preprocessed source file, file_name.i,
is produced for each input file.
You can then compile the preprocessed
files into object files and link the object files by reinvoking the
compiler.
- Listing files
- If you specify any of the listing-related options, such as -qlist or -qsource,
a compiler listing file, file_name.lst, is produced for each
input file. The listing file is placed in your current directory.
- Target files
- If you specify the -M or -qmakedep option, a target
file suitable for inclusion in a makefile, file_name.u is produced for
each input file.