美文网首页
GCC相关编译命令

GCC相关编译命令

作者: gaosiyan | 来源:发表于2018-03-25 23:54 被阅读0次

    编译链接的过程命令

    gcc -E hello.c -o hello.i 预处理

    gcc -S hello.i -o hello.s 编译,输出的是汇编

    gcc -c hello.s -o hello.o 汇编,输出的是机器码

    gcc hello.o -o hello.exe 链接,输出可执行文件


    简化的常用命令

    gcc hello.c 直接生成a.exe

    gcc hello.c -o test 生成test.exe

    gcc hello1.c hello2.c -o test 多文件生成test.exe

    相关文章

      网友评论

          本文标题:GCC相关编译命令

          本文链接:https://www.haomeiwen.com/subject/gvqlcftx.html