编译过程

预处理->编译->汇编->链接

  1. 预处理(Preprocessing):
gcc -E source.c -o source.i
  1. 编译(Compiling):
gcc -S source.i -o source.s
  1. 汇编(Assembling):
gcc -c source.s -o source.o
  1. 链接(Linking):
gcc source.o -o executable

静态库的编译和链接