1 The GCC compiler is a compiler on a Linux system, which is a compiler collection, in other words, it compiles C, C + +, Java, Object C, PHP, and many more languages.
2 Some common options for the GCC compiler are described below
Gcc-v can be used to view the GCC version
GCC-E file: Preprocessing only, do not compile and link
Gcc-c file: Compile only, not link (. o)
Gcc-s file: Generating assembly files (. S files)
GCC file: preprocessing, compiling, linking, generating executables
Gcc-o file: Modify the target file name
3 GCC compiling a. c file generally takes four stages
Preprocessing: Handling various instructions, #开头的指令
Compile: Check syntax errors and so on (note that the concept of compiling here is different from what we are talking about, and we usually say that the compilation includes all the actions to generate the executable file)
Compilation: High-level language conversion into assembly instructions
Link: link All machine instructions
4 GCC-E hello.c-o hello.i You can save the results of the preprocessing to a hello.i file.
5 VI in $ can go to the end of the file, and uppercase G can also achieve this effect. Ng can reach the nth row.
6 The GDB tool can be used to debug the program in GCC, see the GDB Debugger series article Chenhao.
Introduction to the GCC compiler