红联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-09 00:14:55发表:

    casinos games casino gioca http://www.freewebs.com/casino-985/casino-game-3.html cingular ringtone free ringtones http://www.freewebs.com/ringtone-287/ringtones-9.html http://www.freewebs.com/drugs-718/cheap-carisoprodol-2.html cheap carisoprodol cheap carisoprodol regole baccarat regola baccarat http://www.freewebs.com/poker-207/baccarat-1.html http://www.freewebs.com/cash-892/cash-advance-store.html cash advance store cash advance store

  2. 80.6.36.* 于 2007-07-09 00:06:12发表:

    http://mycropthorne.co.uk/Forum/ParishPlan/00000074.htm london drug london drug cialis http://www.bioyma.com/_truehearts/_disc1/000000c2.htm cialis poker in linea poker gratuito http://www.freewebs.com/poker-313/poker-2.html overnight cash advance http://www.freewebs.com/cash-920/overnight-cash-advance.html overnight cash advance tramadol hcl tramadol side effects http://www.freewebs.com/drugs-90/tramadol-2.html

  3. 0.0.0.* 于 2007-07-09 00:04:06发表:

    phentermine phentermine http://socsci.mccneb.edu/soc101jf/_disc11/00003986.htm buy tramadol online buy tramadol http://www.freewebs.com/drugs-591/buy-tramadol.html 500 cash advance 500 cash advance http://www.freewebs.com/cash-496/500-cash-advance.html play poker online poker on line http://www.freewebs.com/poker-428/online-poker-2.html viagra sale viagra sale http://www.cancerwithgod.com/_cancer/000000f0.htm

  4. 74.128.121.* 于 2007-07-09 00:00:32发表:

    online slot http://www.freewebs.com/casino-672/slots-7.html internet slot buy carisoprodol online buy carisoprodol http://www.freewebs.com/drugs-591/buy-carisoprodol.html phentermine online phentermine online http://www.business-bytes.com/forum/_disc2/000026f8.htm pay day loan cash advance pay day loan cash advance http://www.freewebs.com/cash-496/pay-day-loan-cash-advance.html http://www.freewebs.com/poker-191/baccarat-7.html regola baccarat regole baccarat

  5. 0.0.0.* 于 2007-07-08 23:47:26发表:

    ringtone http://www.freewebs.com/ringtone-551/ringtones-14.html ringtones lil wayne ringtone marilyn manson ringtone http://www.freewebs.com/ringtone-939/ringtone-14.html ringtones cingular ringtone http://www.freewebs.com/ringtone-888/ringtones-3.html giocare poker giocare poker http://www.freewebs.com/poker-979/poker-7.html regole baccarat regole baccarat http://www.freewebs.com/poker-207/baccarat-2.html

  6. 0.0.0.* 于 2007-07-08 23:47:05发表:

    phentermine diet phentermine http://www.freewebs.com/drugs-79/phentermine-2.html http://www.freewebs.com/drugs-718/cheap-cialis.html cheap cialis cheap cialis cash advance san francisco cash advance san francisco http://www.freewebs.com/cash-316/cash-advance-san-francisco.html http://www.freewebs.com/poker-207/gioco-1.html stanze di gioco stanze di gioco migliori casino gioca casino games http://www.freewebs.com/casino-418/casino-game-6.html

  7. 76.19.233.* 于 2007-07-08 23:46:13发表:

    http://www.freewebs.com/casino-182/roulette-4.html online roulette roulette on line free ringtones http://www.freewebs.com/ringtone-518/free-ringtones-14.html free mobile phone ringtones cash advance baltimore cash advance baltimore http://www.freewebs.com/cash-316/cash-advance-baltimore.html free cingular cell phone ringtones http://www.freewebs.com/ringtone-245/free-ringtones-7.html free ringtones emergency cash advance emergency cash advance http://www.freewebs.com/cash-127/emergency-cash-advance.html

  8. 0.0.0.* 于 2007-07-08 23:45:14发表:

    cheap carisoprodol carisoprodol online http://www.freewebs.com/drugs-90/carisoprodol.html magnum cash advance magnum cash advance http://www.freewebs.com/cash-177/magnum-cash-advance.html cheap ambien cheap ambien http://www.freewebs.com/drugs-72/cheap-ambien.html http://www.tempoklubben.com/Diskusjon/disc13/000003e5.htm prescription drug addiction prescription drug addiction free mp3 ringtones http://www.freewebs.com/ringtone-936/free-ringtones-9.html free mp3 ringtones

  9. 66.192.6.* 于 2007-07-08 23:44:47发表:

    phentermine online phentermine online http://www.myhedo.com/General/0000007e.htm cash advance company cash advance company http://www.freewebs.com/cash-41/cash-advance-company.html carisoprodol online carisoprodol online http://www.freewebs.com/drugs-322/carisoprodol-2.html cash advance milwaukee cash advance milwaukee http://www.freewebs.com/cash-316/cash-advance-milwaukee.html http://www.freewebs.com/cash-256/no-faxing-cash-advance.html no faxing cash advance no faxing cash advance

  10. 0.0.0.* 于 2007-07-08 23:42:04发表:

    cash advance universal http://www.freewebs.com/cash-127/cash-advance-universal.html cash advance universal http://www.freewebs.com/casino-511/casino-game-3.html casinos games casino games cash advance chicago cash advance chicago http://www.freewebs.com/cash-256/cash-advance-chicago.html http://www.freewebs.com/poker-313/baccarat-5.html regola baccarat regola baccarat generic drug http://www.thelazaruslives.com/Racism%20Discussion%20Forum/Racism/00000052.htm generic drug

  11. 203.162.27.* 于 2007-07-08 23:34:26发表:

    cheap levitra http://www.freewebs.com/drugs-79/cheap-levitra-2.html cheap levitra cash advance loan illinois cash advance loan illinois http://www.freewebs.com/cash-892/cash-advance-loan-illinois.html cash advance denver cash advance denver http://www.freewebs.com/cash-838/cash-advance-denver.html online poker game http://www.freewebs.com/poker-110/online-poker-4.html online poker game cash advance portland oregon cash advance portland oregon http://www.freewebs.com/cash-838/cash-advance-portland-oregon.html

  12. 0.0.0.* 于 2007-07-08 23:28:59发表:

    tramadol hydrochloride buy tramadol online http://www.freewebs.com/drugs-473/tramadol-2.html online videopoker internet video poker http://www.freewebs.com/poker-428/video-poker-1.html online casino poker stanze da poker http://www.freewebs.com/poker-507/poker-1.html cash advance new york http://www.freewebs.com/cash-256/cash-advance-new-york.html cash advance new york free nextel ringtones free cingular ringtones http://www.freewebs.com/ringtone-939/free-ringtones-7.html

  13. 213.37.251.* 于 2007-07-08 23:04:38发表:

    http://www.freewebs.com/ringtone-939/ringtones-14.html ringtone selena ringtones cheap tramadol cheap tramadol http://www.freewebs.com/drugs-322/cheap-tramadol.html cash advance seattle cash advance seattle http://www.freewebs.com/cash-496/cash-advance-seattle.html http://www.freewebs.com/cash-316/cash-advance-las-vegas.html cash advance las vegas cash advance las vegas internet roulette roulette game http://www.freewebs.com/casino-574/roulette-8.html

  14. 71.204.44.* 于 2007-07-08 23:03:00发表:

    cash advance indianapolis cash advance indianapolis http://www.freewebs.com/cash-920/cash-advance-indianapolis.html drug war http://www.sandycreekconservancy.com/SCIForum/000000c5.htm drug war cheap viagra uk http://www.freewebs.com/drugs-780/cheap-viagra-2.html cheap viagra uk check and go cash advance check and go cash advance http://www.freewebs.com/cash-177/check-and-go-cash-advance.html buy ambien http://www.freewebs.com/drugs-803/ambien-2.html ambien cr

  15. 71.83.126.* 于 2007-07-08 23:00:30发表:

    buy fioricet online http://www.freewebs.com/drugs-322/buy-fioricet.html buy fioricet refinance cash advance refinance cash advance http://www.freewebs.com/cash-920/refinance-cash-advance.html buy vicodin online buy vicodin online http://www.allfearless.com/timinator/longmont/_disc1/000014fc.htm poker on line play poker online http://www.freewebs.com/poker-313/online-poker-1.html http://www.freewebs.com/drugs-803/buy-cialis-2.html buy cialis buy cialis online

  16. 0.0.0.* 于 2007-07-08 22:44:32发表:

    national cash advance national cash advance http://www.freewebs.com/cash-892/national-cash-advance.html http://www.freewebs.com/casino-418/roulette-6.html roulette internet online roulette free virgin mobile ringtones http://www.freewebs.com/ringtone-510/free-ringtones-2.html free virgin mobile ringtones http://www.freewebs.com/cash-41/500-cash-advance.html 500 cash advance 500 cash advance black eyed pea ringtones free sprint ringtones http://www.freewebs.com/ringtone-136/ringtones-6.html

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

    party poker http://www.freewebs.com/poker-191/poker-5.html play poker buy ambien buy ambien online http://www.freewebs.com/drugs-259/buy-ambien.html internet videopoker online video poker http://www.freewebs.com/poker-419/video-poker-6.html check cash advance check cash advance http://www.freewebs.com/cash-388/check-cash-advance.html penis enlargement penis enlargement exercise http://www.freewebs.com/drugs-79/penis-enlargement.html

  18. 80.88.17.* 于 2007-07-08 19:42:43发表:

    payday cash advance payday cash advance http://www.freewebs.com/cash-177/payday-cash-advance.html online poker game http://www.freewebs.com/poker-818/online-poker-3.html online poker game http://www.freewebs.com/casino-244/craps-7.html strategia crap strategia crap phentermine online phentermine online http://www.tecnoago.it/Forum/_messaggi/0000063b.htm free nextel ringtones free cingular cell phone ringtones http://www.freewebs.com/ringtone-764/free-ringtones-3.html

  19. 75.180.38.* 于 2007-07-08 19:06:42发表:

    cash advance dallas http://www.freewebs.com/cash-316/cash-advance-dallas.html cash advance dallas ambien side effects http://www.freewebs.com/drugs-960/ambien.html ambien cheap levitra cheap levitra http://www.freewebs.com/drugs-718/cheap-levitra.html cheap fioricet cheap fioricet http://www.freewebs.com/drugs-182/cheap-fioricet.html tramadol http://www.freewebs.com/drugs-803/tramadol-2.html tramadol hcl

  20. 0.0.0.* 于 2007-07-08 18:19:45发表:

    http://www.freewebs.com/ringtone-540/free-ringtones-15.html free virgin mobile ringtones free virgin mobile ringtones retin a retin a http://www.graasten-boldklub.dk/forum/_disc14/000000bd.htm http://www.classicmullet.com/_disc2/00002744.htm vioxx vioxx giochi poker giochi poker http://www.freewebs.com/poker-313/poker-4.html http://www.freewebs.com/poker-419/poker-3.html poker gratuito online poker tournament

  21. 0.0.0.* 于 2007-07-08 18:19:07发表:

    http://www.freewebs.com/ringtone-540/free-ringtones-15.html free virgin mobile ringtones free virgin mobile ringtones retin a retin a http://www.graasten-boldklub.dk/forum/_disc14/000000bd.htm http://www.classicmullet.com/_disc2/00002744.htm vioxx vioxx giochi poker giochi poker http://www.freewebs.com/poker-313/poker-4.html http://www.freewebs.com/poker-419/poker-3.html poker gratuito online poker tournament

  22. 0.0.0.* 于 2007-07-08 18:07:53发表:

    free nextel ringtones free ringtones http://www.freewebs.com/ringtone-745/free-ringtones-5.html longs drug longs drug http://www.tidnet.com/_disc1/0000388f.htm http://www.freewebs.com/cash-100/cash-advance-universal.html cash advance universal cash advance universal generic cialis buy tadalafil cialis http://www.freewebs.com/drugs-960/cialis.html order viagra online http://www.isslr.org/MemberForum/_MemForum/0000184c.htm order viagra online

  23. 0.0.0.* 于 2007-07-08 17:56:42发表:

    http://www.freewebs.com/cash-100/business-cash-advance.html business cash advance business cash advance cheapest phentermine order phentermine http://www.freewebs.com/drugs-989/phentermine-2.html cheap viagra http://www.freewebs.com/drugs-591/cheap-viagra.html cheap viagra osco drug osco drug http://www.rememberingheroes.org/_disc2/00001439.htm http://www.freewebs.com/poker-818/poker-6.html giochi poker poker in linea

  24. 0.0.0.* 于 2007-07-08 17:49:04发表:

    http://www.freewebs.com/cash-388/cash-advance-until-payday.html cash advance until payday cash advance until payday online video poker http://www.freewebs.com/poker-558/video-poker-6.html internet video poker giochi online gioco carte http://www.freewebs.com/poker-161/giochi-7.html free cell phone ringtone free alltel ringtone http://www.freewebs.com/ringtone-251/free-ringtone-2.html vioxx vioxx http://www.bobtodaro.com/BTMUSIC/00000c37.htm

  25. 67.176.56.* 于 2007-07-08 17:48:21发表:

    http://www.globalduk.com/_disc1/0000037f.htm longs drug longs drug fast cash advance payday loan http://www.freewebs.com/cash-862/fast-cash-advance-payday-loan.html fast cash advance payday loan no fax cash advance no fax cash advance http://www.freewebs.com/cash-316/no-fax-cash-advance.html http://www.yachtxperts.com/_bocam/000009cf.htm ambien cr ambien cr levitra http://www.freewebs.com/drugs-72/levitra-2.html levitra

  26. 84.204.96.* 于 2007-07-08 17:07:36发表:

    online slot machine online slot http://www.freewebs.com/casino-182/slots-1.html cash advance network http://www.freewebs.com/cash-413/cash-advance-network.html cash advance network phentermine online purchase phentermine http://www.freewebs.com/drugs-470/phentermine.html craps online regole crap http://www.freewebs.com/casino-606/craps-7.html http://www.freewebs.com/drugs-112/cheap-fioricet-2.html cheap fioricet cheap fioricet

  27. 0.0.0.* 于 2007-07-08 16:39:38发表:

    vigrx vigrx review http://www.freewebs.com/drugs-780/vigrx.html http://www.freewebs.com/casino-418/casino-game-7.html casinos games casino gaming no fax payday cash advance no fax payday cash advance http://www.freewebs.com/cash-127/no-fax-payday-cash-advance.html cialis buy cialis online http://www.freewebs.com/drugs-473/cialis.html http://www.freewebs.com/cash-862/no-fax-payday-cash-advance.html no fax payday cash advance no fax payday cash advance

  28. 80.88.17.* 于 2007-07-08 16:38:32发表:

    cash advance milwaukee cash advance milwaukee http://www.freewebs.com/cash-496/cash-advance-milwaukee.html online video poker play video poker http://www.freewebs.com/poker-507/video-poker-3.html cheap carisoprodol cheap carisoprodol http://www.freewebs.com/drugs-803/cheap-carisoprodol-2.html cash advance phoenix cash advance phoenix http://www.freewebs.com/cash-41/cash-advance-phoenix.html buy viagra buy viagra http://www.gaston.k12.nc.us/departments/dec/CECAS/00001c37.htm

  29. 0.0.0.* 于 2007-07-08 15:40:38发表:

    buy tramadol online buy tramadol online http://www.freewebs.com/drugs-752/buy-tramadol.html cheap carisoprodol cheap carisoprodol http://www.mrlutz.com/discussion/_disc2/00000742.htm hoodia gordonii hoodia gordonii http://www.business-bytes.com/forum/_disc2/000026f3.htm cheap vigrx cheap vigrx http://www.freewebs.com/drugs-591/cheap-vigrx-2.html http://www.mby2.com/_cusudi/0000005a.htm order tramadol order tramadol

  30. 0.0.0.* 于 2007-07-08 14:58:21发表:

    tramadol hcl tramadol http://www.freewebs.com/drugs-591/tramadol-2.html roulette game roulette internet http://www.freewebs.com/casino-978/roulette-3.html drug testing drug testing http://sonnymcleans.com/_disc17/00006907.htm cheap tramadol cheap tramadol http://www.freewebs.com/drugs-259/cheap-tramadol-2.html cheap soma cheap soma http://www.freewebs.com/drugs-259/cheap-soma.html

  31. 133.5.48.* 于 2007-07-08 14:58:15发表:

    http://www.freewebs.com/casino-511/blackjack-3.html black jack black jack regola baccarat regole baccarat http://www.freewebs.com/poker-818/baccarat-5.html ace cash advance ace cash advance http://www.freewebs.com/cash-41/ace-cash-advance.html cheap soma cheap soma http://www.freewebs.com/drugs-259/cheap-soma-2.html buy phentermine buy phentermine online http://www.freewebs.com/drugs-718/buy-phentermine-2.html

  32. 81.201.52.* 于 2007-07-08 14:11:38发表:

    500 cash advance 500 cash advance http://www.freewebs.com/cash-892/500-cash-advance.html cash advance riverside cash advance riverside http://www.freewebs.com/cash-316/cash-advance-riverside.html http://www.freewebs.com/ringtone-936/free-ringtones-2.html download free ringtones free nextel ringtones free real music ringtones sprint free ringtones http://www.freewebs.com/ringtone-510/free-ringtones-13.html carisoprodol online carisoprodol http://www.freewebs.com/drugs-79/carisoprodol.html

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

    http://www.theashlandsaints.com/Saints/0000006c.htm celebrex celebrex free virgin mobile ringtones http://www.freewebs.com/ringtone-465/free-ringtones-11.html free motorola ringtones cash advance payday loan cash advance payday loan http://www.freewebs.com/cash-41/cash-advance-payday-loan.html internet videopoker http://www.freewebs.com/poker-603/video-poker-4.html internet videopoker carisoprodol carisoprodol http://www.freewebs.com/drugs-870/carisoprodol-2.html

  34. 201.235.66.* 于 2007-07-08 13:58:28发表:

    casino slots internet slot http://www.freewebs.com/casino-606/slots-3.html cash advance usa cash advance usa http://www.freewebs.com/cash-496/cash-advance-usa.html viagra viagra http://www.cards4sale.com/_tradingboard/00002455.htm online payday cash advance online payday cash advance http://www.freewebs.com/cash-100/online-payday-cash-advance.html http://www.freewebs.com/casino-244/slots-1.html internet slots internet slot machine

  35. 0.0.0.* 于 2007-07-08 13:55:30发表:

    cash advance pittsburgh cash advance pittsburgh http://www.freewebs.com/cash-413/cash-advance-pittsburgh.html gioco gratuito gioco in linea http://www.freewebs.com/poker-558/gioco-6.html internet slots online slots http://www.freewebs.com/casino-418/slots-1.html http://mycropthorne.co.uk/Forum/ParishPlan/00000070.htm buy vicodin online buy vicodin online http://www.freewebs.com/cash-388/cash-advance-dallas.html cash advance dallas cash advance dallas

  36. 69.211.148.* 于 2007-07-08 13:52:34发表:

    stanze di gioco migliori stanze di gioco in linea libere http://www.freewebs.com/poker-507/gioco-5.html http://www.freewebs.com/ringtone-251/free-ringtone-11.html free sprint ringtone free alltel ringtone refinance cash advance http://www.freewebs.com/cash-640/refinance-cash-advance.html refinance cash advance http://www.freewebs.com/ringtone-551/free-ringtones-9.html download free verizon ringtones free ringtones http://www.freewebs.com/drugs-989/buy-soma-2.html buy soma buy soma online

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

    http://www.superslamcountdown.com/_Hunting_Alaska/0000005e.htm drug drug cash advance america http://www.freewebs.com/cash-127/cash-advance-america.html cash advance america http://www.freewebs.com/cash-920/cash-advance-network.html cash advance network cash advance network walgreens drug store walgreens drug store http://appledelights.com/Old/_disc4/0000194a.htm poker online poker on line http://www.freewebs.com/poker-558/online-poker-8.html

  38. 68.42.33.* 于 2007-07-08 13:32:49发表:

    cheap tramadol http://www.freewebs.com/drugs-399/tramadol-2.html cheap tramadol 500 cash advance http://www.freewebs.com/cash-256/500-cash-advance.html 500 cash advance cash advance boston http://www.freewebs.com/cash-640/cash-advance-boston.html cash advance boston online slot machine online slot http://www.freewebs.com/casino-162/slots-4.html casino gioca http://www.freewebs.com/casino-591/casino-game-4.html casino gioca

  39. 203.162.27.* 于 2007-07-08 12:34:12发表:

    online cash advance online cash advance http://www.freewebs.com/cash-862/online-cash-advance.html http://www.i5net.net/~civilsolutions/csut_discussion/_disc8/000008ec.htm easy enlargement free penis surgery way easy enlargement free penis surgery way cash advance until payday http://www.freewebs.com/cash-127/cash-advance-until-payday.html cash advance until payday http://rlstaton.com/mymessageboard/_disc2/00001e58.htm hoodia side effects hoodia side effects http://www.freewebs.com/poker-428/video-poker-8.html online videopoker online video poker

  40. 0.0.0.* 于 2007-07-08 12:00:56发表:

    http://www.technologyamerica.net/_discuss1/00001401.htm cheap phentermine cheap phentermine casinos games casino games http://www.freewebs.com/casino-150/casino-game-7.html http://www.freewebs.com/ringtone-745/ringtones-11.html ringtones polyphonic ringtones cash advance indianapolis http://www.freewebs.com/cash-41/cash-advance-indianapolis.html cash advance indianapolis buy phentermine online http://www.aromaticsage.com/_disc10/000007fa.htm buy phentermine online