Author: wstruecolor unix under development tool commonly used gcc compiler, gcc for I know very little understanding, which is generally used gcc -o xx xx.cpp today rolled over the gnu gcc manual took some time to sum up a bit , Share it! Oh, I hope to help everyone. Here you introduce the common command options for GCC (you can refer to GNU GCC Manual). 1. GCC supported by GCC. GCC full name is GNU Compiler Collection, including some primary compiler support language C, C , Objective -C, Java, Fortran, And ADA. 2.GCC Command Options When you perform GCC, you usually pass through four processing, preProcessing, Compilation. You can stop to a process by adding different options. a. General option. -c -s -e -o file -pipe -pass-exit-cots -x language -v - ### --help --target-help --Version compiler compile file to pass As mentioned above. It is done in order. The compiler determines which phase of the input file: file.cc file should be processed by Yu. File.ic source file does not have to handle Yu. File.II C source files do not have to work. File.hc / c Yu compile head file. File.cc file.cp file.cxx file.cpp file.cpp file.c file.c C source file to be processed. File.hh File.h C header file is converted to Herd hand. File.s assembler code. File.s assemble -x language ================================================================================= suffix identifying languge may be: c c-header cpp-output c c - header c - cpp-output objective-c objective-c-header objc-cpp-output assembler assembler-with-cpp ada f77 f77-cpp-input ratfor Java Treeelang -x None uses suffix identification, turn off language recognition. -c just compiling is not connected, the generated is the target file. .c, .i, .s ==> .o -s just compile not assembly, generate compilation Code. .C, .i ==>. S -e only performs Yu compilation, does not do other processing. -O file outputs the output file to the file. -V Prints the command line information of the compiler's internal compilation . The version of the compiler. - ### 同, but not really executing commands. The information of each phase is saved to temporary files when compiling. If you don't want to use temporary files, you can use the pipeline. The command option is used. However, some systems do not support. Editor's Note: No pair of netizens add other options such as -on (n = 1, 2, 3) -Arch = Pentium4 These for optimized -G for debugging There is also a PROF supported to determine the operational efficiency of the program.