红联Linux门户
Linux帮助

gcc编译过程

发布时间:2006-11-05 00:54:25来源:红联作者:hfh08
gcc在编译c语言的实现
------简单语法
#gcc cu.c -o cu
#./cu
结果:hello world
其中:用gcc对源文件进行编译和连接,-o指定可执行文件的名称.
也可以这样:
#gcc cu.c
#./a.out
结果:hello world
上述过程看似简单但是gcc的工作远比这复杂,在执行过程中要:预处理、编译、汇编、连接、都是在gcc后台完成的。首先,gcc运行预处理程序cpp,展开成cu.c中的宏,并在其中插入#include文件所包含的内容,然后把预处理后的源代码变成目标代码,最后通过连接程序创建可执行文件。通常可用gcc中的-E选项。
为了使其显示更准确地执行过程如下命令:
#gcc -E cu.c -o cu.cpp
经过预处理后,gcc会把cu.cpp编译成目标代码。这个过程用gcc的-c选项实现。
#gcc -x cpp-output -c cu.cpp -o cu.c
使用gcc可以将多个文件源文件进行编译成目标文件。
#gcc prt.c printf2.c -o hello
#./hello
文章评论

共有 2187 条评论

  1. 0.0.0.* 于 2007-07-08 11:41:01发表:

    online poker http://www.freewebs.com/poker-191/poker-3.html online poker tournament prescription drug addiction http://www.greenshus.dk/_disc1/0000006d.htm prescription drug addiction http://www.essex.ac.uk/afm/ma-discuss/_afm-ma-discuss/00000c1a.htm ambien online ambien online quick cash advance quick cash advance http://www.freewebs.com/cash-413/quick-cash-advance.html online video poker http://www.freewebs.com/poker-603/video-poker-7.html internet video poker

  2. 200.31.42.* 于 2007-07-08 11:29:03发表:

    cash advance loan cash advance loan http://www.freewebs.com/cash-640/cash-advance-loan.html http://www.freewebs.com/ringtone-136/ringtones-12.html beatles ringtones ringtones cheap levitra cheap levitra http://www.freewebs.com/drugs-79/cheap-levitra.html http://www.freewebs.com/cash-316/cash-advance-loan-online.html cash advance loan online cash advance loan online vigrx http://www.freewebs.com/drugs-182/vigrx-2.html vigrx pill

  3. 76.192.128.* 于 2007-07-08 11:25:28发表:

    http://www.freewebs.com/poker-507/video-poker-1.html play video poker online video poker business cash advance business cash advance http://www.freewebs.com/cash-496/business-cash-advance.html cheap phentermine cheap phentermine http://www.freewebs.com/drugs-90/cheap-phentermine.html buy carisoprodol http://www.freewebs.com/drugs-182/buy-carisoprodol.html buy carisoprodol http://www.freewebs.com/cash-862/check-and-go-cash-advance.html check and go cash advance check and go cash advance

  4. 59.190.123.* 于 2007-07-08 08:05:58发表:

    http://www.freewebs.com/cash-127/500-cash-advance.html 500 cash advance 500 cash advance http://amitechnologies-inc.com/_cusudi/00000444.htm fioricet fioricet cheap vigrx cheap vigrx http://www.freewebs.com/drugs-989/cheap-vigrx-2.html generic viagra http://www.tebidine.com/twm-enterprises/_disc1/00001302.htm generic viagra buy viagra buy viagra http://www.mooseheadband.com/_disc3/00000105.htm

  5. 0.0.0.* 于 2007-07-08 08:03:14发表:

    internet blackjack blackjack game http://www.freewebs.com/casino-244/blackjack-8.html buy phentermine buy phentermine http://www.usechemicalssafely.com/_disc1/000000c8.htm prescription drug information http://www.leshartman.com/Band/Forum2/_disc8/0000064b.htm prescription drug information black jack play blackjack http://www.freewebs.com/casino-591/blackjack-7.html http://rover.vetmed.lsu.edu/SCAVMA/_disc2011/00000330.htm viagra erection viagra erection

  6. 0.0.0.* 于 2007-07-08 08:01:36发表:

    http://www.freewebs.com/drugs-470/buy-ambien.html buy ambien buy ambien online http://www.blackhillsptcruisers.com/DiscussionWeb/_WDWGNext/00000256.htm buy tramadol buy tramadol pay day cash advance pay day cash advance http://www.freewebs.com/cash-177/pay-day-cash-advance.html http://www.edaytradertax.com/_disc1/000010d4.htm hoodia hoodia gioco poker stanza poker http://www.freewebs.com/poker-191/poker-9.html

  7. 0.0.0.* 于 2007-07-08 08:01:33发表:

    http://www.freewebs.com/cash-413/cash-advance-san-antonio.html cash advance san antonio cash advance san antonio cheap phentermine phentermine online pharmacy http://www.freewebs.com/drugs-718/phentermine.html http://www.freewebs.com/cash-256/pay-day-cash-advance.html pay day cash advance pay day cash advance http://www.freewebs.com/drugs-322/cheap-soma.html cheap soma cheap soma download free ringtones download free ringtones http://www.freewebs.com/ringtone-465/ringtones-4.html

  8. 0.0.0.* 于 2007-07-08 07:54:34发表:

    online casino promozioni in linea superiori http://www.freewebs.com/casino-162/casino-8.html http://www.freewebs.com/poker-313/baccarat-1.html regole baccarat regola baccarat buy carisoprodol buy carisoprodol http://www.edwardjamesrichard.com/_disc13/000036a1.htm http://www.mcap.ms/_mcap1/00000091.htm order soma order soma http://www.freewebs.com/cash-838/no-fax-cash-advance.html no fax cash advance no fax cash advance

  9. 76.19.233.* 于 2007-07-08 07:53:19发表:

    http://www.freewebs.com/cash-41/cash-advance-san-jose-california.html cash advance san jose california cash advance san jose california cash advance company loan http://www.freewebs.com/cash-316/cash-advance-company-loan.html cash advance company loan buy tadalafil cialis http://www.freewebs.com/drugs-718/buy-cialis.html buy cialis buy ultram http://www.bigbellyservices.com/_disc5/00000b28.htm buy ultram cash advance cleveland ohio cash advance cleveland ohio http://www.freewebs.com/cash-838/cash-advance-cleveland-ohio.html

  10. 0.0.0.* 于 2007-07-08 07:52:39发表:

    http://www.freewebs.com/cash-41/cash-advance-san-jose-california.html cash advance san jose california cash advance san jose california cash advance company loan http://www.freewebs.com/cash-316/cash-advance-company-loan.html cash advance company loan buy tadalafil cialis http://www.freewebs.com/drugs-718/buy-cialis.html buy cialis buy ultram http://www.bigbellyservices.com/_disc5/00000b28.htm buy ultram cash advance cleveland ohio cash advance cleveland ohio http://www.freewebs.com/cash-838/cash-advance-cleveland-ohio.html

  11. 0.0.0.* 于 2007-07-08 07:49:14发表:

    http://www.freewebs.com/casino-162/slots-7.html internet slots internet slots http://www.freewebs.com/poker-161/giochi-6.html tavoli multigiocatori poker giochi internet payday cash advance texas payday cash advance texas http://www.freewebs.com/cash-838/payday-cash-advance-texas.html world casino software casino http://www.freewebs.com/casino-418/casino-2.html business cash advance business cash advance http://www.freewebs.com/cash-838/business-cash-advance.html

  12. 219.111.58.* 于 2007-07-08 07:46:09发表:

    http://www.freewebs.com/ringtone-518/ringtones-14.html free ringtone free ringtone http://www.freewebs.com/cash-640/fast-cash-advance-payday-loan.html fast cash advance payday loan fast cash advance payday loan http://www.iaap-satellite.org/_disc1/0000120b.htm phentermine pharmacy phentermine pharmacy cheap cialis http://www.freewebs.com/drugs-112/cialis.html cheap cialis casino gioca casinos games http://www.freewebs.com/casino-834/casino-game-3.html

  13. 0.0.0.* 于 2007-07-08 07:45:39发表:

    cash advance tulsa cash advance tulsa http://www.freewebs.com/cash-920/cash-advance-tulsa.html http://www.freewebs.com/cash-127/cash-advance-cleveland-ohio.html cash advance cleveland ohio cash advance cleveland ohio no fax payday cash advance http://www.freewebs.com/cash-100/no-fax-payday-cash-advance.html no fax payday cash advance http://intellegentpursuits.com/_first/00000057.htm order phentermine order phentermine cash advance http://www.freewebs.com/cash-920/cash-advance.html cash advance

  14. 0.0.0.* 于 2007-07-08 07:44:29发表:

    online blackjack http://www.freewebs.com/casino-606/blackjack-4.html play blackjack black jack play blackjack http://www.freewebs.com/casino-244/blackjack-5.html buy levitra levitra online http://www.freewebs.com/drugs-322/levitra.html cash advance san antonio cash advance san antonio http://www.freewebs.com/cash-496/cash-advance-san-antonio.html poker on line play poker online http://www.freewebs.com/poker-656/online-poker-8.html

  15. 0.0.0.* 于 2007-07-08 07:37:09发表:

    http://www.freewebs.com/cash-177/fast-cash-advance.html fast cash advance fast cash advance http://www.creativewebs2.com/_disc1/000000a9.htm buy cialis buy cialis http://www.ispor.org/disc/_disc/00000fd0.htm discount drug discount drug online videopoker http://www.freewebs.com/poker-428/video-poker-4.html internet videopoker buy vigrx buy vigrx http://www.freewebs.com/drugs-752/buy-vigrx-2.html

  16. 202.164.165.* 于 2007-07-08 07:33:32发表:

    buy ambien online buy ambien http://www.freewebs.com/drugs-259/buy-ambien-2.html cash advance nassau cash advance nassau http://www.freewebs.com/cash-177/cash-advance-nassau.html vioxx vioxx http://www.birdbrainsolutions.com/birdbrainforum/BeakSpeak/0000008c.htm drug rehab program http://virtual.yosemite.cc.ca.us/jcurl/jcurl/_disc1/00000cda.htm drug rehab program regola crap http://www.freewebs.com/casino-398/craps-8.html regole crap

  17. 0.0.0.* 于 2007-07-08 07:20:13发表:

    cash advance nassau http://www.freewebs.com/cash-127/cash-advance-nassau.html cash advance nassau http://detroit.originalchurchofgod.net/_prayer_req/00000537.htm buy meridia buy meridia medicare drug plan medicare drug plan http://www.bigtalldirect.com/pages/_disc2/00004a73.htm cash advance america cash advance america http://www.freewebs.com/cash-892/cash-advance-america.html payday cash advance http://www.freewebs.com/cash-183/payday-cash-advance.html payday cash advance

  18. 203.167.76.* 于 2007-07-08 07:15:18发表:

    viagra alternative viagra alternative http://www.impt.us/_disc1/00000172.htm http://www.freewebs.com/cash-862/cash-advance-today.html cash advance today cash advance today cheap carisoprodol cheap carisoprodol http://www.freewebs.com/drugs-322/cheap-carisoprodol-2.html payday cash advance payday cash advance http://www.freewebs.com/cash-892/payday-cash-advance.html cash advance sacramento cash advance sacramento http://www.freewebs.com/cash-256/cash-advance-sacramento.html

  19. 71.204.44.* 于 2007-07-08 07:14:58发表:

    cash advance pennsylvania cash advance pennsylvania http://www.freewebs.com/cash-413/cash-advance-pennsylvania.html gioco in linea http://www.freewebs.com/poker-507/gioco-3.html gioco gratuito order soma http://www.taseminar.at/_disc1/00000058.htm order soma business cash advance business cash advance http://www.freewebs.com/cash-892/business-cash-advance.html vicodin vicodin http://www.houselist.com/_forum4/000000dc.htm

  20. 0.0.0.* 于 2007-07-08 07:10:49发表:

    ringtones free cingular ringtones http://www.freewebs.com/ringtone-540/ringtones-8.html giochi casino http://www.freewebs.com/casino-574/casino-game-2.html casinos games http://www.freewebs.com/casino-182/blackjack-1.html internet blackjack play blackjack buy levitra buy levitra http://www.freewebs.com/drugs-718/buy-levitra.html soma carisoprodol http://www.freewebs.com/drugs-989/soma.html soma

  21. 0.0.0.* 于 2007-07-08 07:01:49发表:

    http://www.yachtxperts.com/_bocam/000009d7.htm buy viagra buy viagra casino games http://www.freewebs.com/casino-606/casino-game-1.html casino games soma soma http://vip-membersfp.webc.lyceu.net/www.ez4u.se/_disc1/0000003a.htm blackjack game black jack http://www.freewebs.com/casino-574/blackjack-1.html meridia http://www.kityanpoetry.com/community/_disc7/00001181.htm meridia

  22. 0.0.0.* 于 2007-07-08 07:01:23发表:

    buy cialis buy cialis online http://www.freewebs.com/drugs-322/buy-cialis-2.html roulette on line online roulette http://www.freewebs.com/casino-496/roulette-3.html buy viagra buy viagra online http://www.freewebs.com/drugs-79/buy-viagra-2.html buy levitra http://www.freewebs.com/drugs-470/levitra.html levitra online phentermine cheapest phentermine http://www.freewebs.com/drugs-72/phentermine.html

  23. 220.194.47.* 于 2007-07-08 06:58:43发表:

    http://www.freewebs.com/cash-177/advance-america-cash-advance.html advance america cash advance advance america cash advance http://www.freewebs.com/drugs-470/buy-levitra-2.html buy levitra buy levitra cash advance columbus ohio http://www.freewebs.com/cash-862/cash-advance-columbus-ohio.html cash advance columbus ohio vigrx review vigrx pill http://www.freewebs.com/drugs-470/vigrx.html http://www.freewebs.com/cash-640/cash-advance-phoenix.html cash advance phoenix cash advance phoenix

  24. 218.242.245.* 于 2007-07-08 06:57:57发表:

    free motorola ringtones download free verizon ringtones http://www.freewebs.com/ringtone-728/free-ringtones.html cash advance phoenix cash advance phoenix http://www.freewebs.com/cash-183/cash-advance-phoenix.html ringtone http://www.freewebs.com/ringtone-595/ringtone-13.html ringtone online slots casino slots http://www.freewebs.com/casino-591/slots-1.html no fax payday cash advance http://www.freewebs.com/cash-892/no-fax-payday-cash-advance.html no fax payday cash advance

  25. 71.83.126.* 于 2007-07-08 06:56:59发表:

    generic viagra http://www.iaap-satellite.org/_disc1/0000120a.htm generic viagra faxless cash advance faxless cash advance http://www.freewebs.com/cash-388/faxless-cash-advance.html instant cash advance instant cash advance http://www.freewebs.com/cash-892/instant-cash-advance.html http://www.freewebs.com/poker-110/online-poker-5.html online poker game poker on line buy tramadol http://www.freewebs.com/drugs-960/buy-tramadol.html buy tramadol online

  26. 0.0.0.* 于 2007-07-08 06:49:27发表:

    casinos in linea superiore http://www.freewebs.com/casino-574/casino-1.html virtual casino http://www.freewebs.com/cash-100/payroll-cash-advance.html payroll cash advance payroll cash advance xenical xenical http://mchome.lincoln.ac.uk/subsite/Week4A/000000cf.htm http://www.dylanryanmay.com/_disc1/00000070.htm buy viagra buy viagra cash advance credit card cash advance credit card http://www.freewebs.com/cash-413/cash-advance-credit-card.html

  27. 0.0.0.* 于 2007-07-08 06:24:02发表:

    free sprint ringtones marilyn manson ringtones http://www.freewebs.com/ringtone-510/ringtones-12.html free cingular ringtones free cingular ringtones http://www.freewebs.com/ringtone-5/ringtones-11.html buy fioricet buy fioricet online http://www.freewebs.com/drugs-591/buy-fioricet.html http://www.freewebs.com/cash-496/cash-advance-new-york.html cash advance new york cash advance new york online casino poker poker gratuito http://www.freewebs.com/poker-806/poker-2.html

  28. 71.91.7.* 于 2007-07-08 06:20:00发表:

    cash advance paydayloans cash advance paydayloans http://www.freewebs.com/cash-920/cash-advance-paydayloans.html viagra erection viagra erection http://www.familyminds.biz/_disc1/0000007a.htm http://www.globalinkonline.com/_disc3/0000020e.htm hoodia hoodia http://www.freewebs.com/drugs-870/cheap-phentermine-2.html cheap phentermine cheap phentermine regola baccarat http://www.freewebs.com/poker-110/baccarat-3.html regola baccarat

  29. 77.70.106.* 于 2007-07-08 05:47:14发表:

    buy vicodin http://www.lo-ung.com/_disc6/00000581.htm buy vicodin cash advance oklahoma city http://www.freewebs.com/cash-177/cash-advance-oklahoma-city.html cash advance oklahoma city http://www.freewebs.com/cash-388/cash-advance-tulsa.html cash advance tulsa cash advance tulsa drug addiction drug addiction http://www.tebidine.com/twm-enterprises/_disc1/000012f6.htm viagra viagra http://www.11avenue.com/forum/_disc12/00000327.htm

  30. 67.169.172.* 于 2007-07-08 05:44:20发表:

    strategie crap regole crap http://www.freewebs.com/casino-591/craps-8.html buy fioricet buy fioricet online http://www.freewebs.com/drugs-322/buy-fioricet-2.html drug detox drug detox http://www.dswa.org.uk/dswatalk/walling/0000098c.htm generic viagra generic viagra http://www.voteing.info/_disc1/000013d5.htm http://www.patacake.com/Discussions/Kids/_disc29/00001c64.htm celexa celexa

  31. 24.214.180.* 于 2007-07-08 05:23:28发表:

    tavoli multigiocatori poker gioco http://www.freewebs.com/poker-989/giochi-9.html http://www.freewebs.com/cash-316/cash-advance-omaha.html cash advance omaha cash advance omaha regola crap http://www.freewebs.com/casino-511/craps-3.html craps online cash advance no credit check http://www.freewebs.com/cash-838/cash-advance-no-credit-check.html cash advance no credit check play video poker online video poker http://www.freewebs.com/poker-110/video-poker-1.html

  32. 67.189.109.* 于 2007-07-08 05:02:37发表:

    buy ambien buy ambien online http://www.freewebs.com/drugs-470/buy-ambien-2.html http://www.freewebs.com/cash-496/cash-advance-with-savings-account.html cash advance with savings account cash advance with savings account http://dw3031.k12.sd.us/semesterproject/ComputerCorner/00000026.htm tramadol tramadol hoodia diet hoodia diet http://www.socialnetworkforseniors.com/Poetry/0000006b.htm discount drug http://www.mysharktank.com/discuss/_disc1/00000185.htm discount drug

  33. 68.188.188.* 于 2007-07-08 05:02:10发表:

    london drug london drug http://www.denormalization.com/BLOG/Discussions/00000073.htm cash advance portland oregon cash advance portland oregon http://www.freewebs.com/cash-127/cash-advance-portland-oregon.html soma soma http://www.edwardjamesrichard.com/_disc13/0000369d.htm http://www.freewebs.com/ringtone-939/ringtones-7.html cingular ringtone cingular ringtones buy carisoprodol http://www.freewebs.com/drugs-322/buy-carisoprodol.html buy carisoprodol online

  34. 0.0.0.* 于 2007-07-08 05:00:02发表:

    cheap fioricet cheap fioricet http://www.freewebs.com/drugs-803/cheap-fioricet-2.html penis enlargement pill http://www.heightstowers.com/_disc10/00001081.htm penis enlargement pill casino poker http://www.freewebs.com/poker-110/poker-9.html casino poker ringtones http://www.freewebs.com/ringtone-540/ringtones-7.html download free ringtone vioxx vioxx http://www.labarbabietola.it/forum/forum/00000a2a.htm

  35. 69.211.148.* 于 2007-07-08 04:35:33发表:

    regola baccarat regole baccarat http://www.freewebs.com/poker-507/baccarat-3.html prescription drug addiction prescription drug addiction http://mj3024.k12.sd.us/_disc1/00000058.htm hydrocodone http://thetrainingclinic.com/_disc1/000009b4.htm hydrocodone cheap phentermine cheap phentermine http://www.freewebs.com/drugs-72/cheap-phentermine-2.html cheap vigrx cheap vigrx http://www.freewebs.com/drugs-259/cheap-vigrx.html