3.2. Options Controlling the Kind of Output

3.2 Options Controlling the Kind of Output

Compilation can involve up to four stages: preprocessing, compilation proper, assembly and linking, always in that order. GCC is capable of preprocessing and compiling several files either into several assembler input files, or into one assembler input file; then each assembler input file produces an object file, and linking combines all the object files (those newly compiled, and those specified as input) into an executable file.

For any given input file, the file name suffix determines what kind of compilation is done:

file.c
C source code that must be preprocessed.
file.i
C source code that should not be preprocessed.
file.ii
C++ source code that should not be preprocessed.
file.m 登录查看完整内容