㈠We know, GCC compiler principle of work
⑵Common file extension
.c C of original program
.C/.cc/.cxx C++ of original program
.m Objjective-C of original program
.i The pretreatment of C has been original program
.iiii The pretreatment of C++ has been original program
.s/.S Assembly language of original program
.hh Pretreatment file pre-processing files
.o object file
.a//.so Compiled a library file compiled a library file
⑶How to compile C file
gcc - c hello.c ----------- hello.o (object file)
gcc -c -o hello2.o hello.c --------hello2.o (object file)
gcc -o hello hello.c ------------ hello (binary)
gcc -o hello hello.o ------------ hello (binary)
If have header files
gcc -I/xxxxx -c -o ;
⑷how to compiler static libraries and dynamic library
static library
1. ar rv libhello.a hello.o XXX.o XXX.o --------------------libhello.a
use static library