c/c++编译阶段

四个编译阶段

以编译文件hello.c为例

  1. 预编译
gcc -E hello.c -o hello.i
  1. 汇编
gcc -S hello.c -o hello.s
  1. 目标文件
gcc -c hello.c -o hello.o

4.链接,生成可执行文件

gcc hello.c -o hello