码迷,mamicode.com
首页 > 系统相关 > 详细

Linux GCC

时间:2016-06-05 15:16:23      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:

1 //test.c
2 #include <stdio.h>
3 int main()
4 {
5     printf("Hello World!\n");
6     return 0;
7 }
  • One Shot
    gcc test.c -o test
    ./test

 

  • 5 Steps
  1. Preprocessing
    gcc -E test.c -o test.i
  2. Compilation
    gcc -S test.i -o test.s
  3. Assembly
    gcc -c test.s -o test.o
  4. Linking
    gcc test.o -o test
  5. Run
    ./test

Linux GCC

标签:

原文地址:http://www.cnblogs.com/s5plus1/p/5560812.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!