- 一步到位的编译:gcc test.c -o test(生成之后的文件名)
- 一步步编译
预处理:gcc -E test.c -o test.i 或 gcc -E test.c (预处理结果就是将stdio.h 文件中的内容插入到test.c中了)
编译为汇编代码:gcc -S test.i -o test.s (生成汇编代码)
汇编:gcc -c test.s -o test.o
连接:gcc test.o -o test - 多个程序文件的编译
相当于:gcc test1.c test2.c -o test
gcc -c test1.c -o test1.o gcc -c test2.c -o test2.o gcc test1.o test2.o -o test
linux-c基础---编译命令
最新推荐文章于 2023-08-10 19:54:13 发布