红联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 09:53:16发表:

    cheap fioricet cheap fioricet http://www.freewebs.com/drugs-375/cheap-fioricet.html buy tramadol online buy tramadol online http://www.freewebs.com/drugs-989/buy-tramadol-2.html buy soma online soma carisoprodol http://www.freewebs.com/drugs-322/soma-2.html prescription drug information prescription drug information http://ss3054.k12.sd.us/_disc1/0000004c.htm gioco carte giocare http://www.freewebs.com/poker-989/giochi-2.html

  2. 0.0.0.* 于 2007-07-09 09:44:38发表:

    check and go cash advance http://www.freewebs.com/cash-496/check-and-go-cash-advance.html check and go cash advance casino slot online slot http://www.freewebs.com/casino-837/slots-6.html cheap vigrx cheap vigrx http://www.freewebs.com/drugs-780/cheap-vigrx.html http://www.freewebs.com/casino-511/slots-8.html internet slot casino slots casinos games casino gioca http://www.freewebs.com/casino-834/casino-game-1.html

  3. 71.148.35.* 于 2007-07-09 09:39:57发表:

    buy carisoprodol buy carisoprodol http://spd-oberhavel-forum.n-m-g.de/_disc39/00000074.htm vioxx http://home.satx.rr.com/usedbooksiwhs/BooksForSale/00000057.htm vioxx tramadol online http://www.gaitedhorsebooks.com/_disc50/00000845.htm tramadol online http://www.freewebs.com/poker-549/video-poker-2.html online videopoker internet video poker roulette game roulette game http://www.freewebs.com/casino-834/roulette-7.html

  4. 0.0.0.* 于 2007-07-09 09:28:55发表:

    check cash advance check cash advance http://www.freewebs.com/cash-496/check-cash-advance.html http://www.phimuepsilon.com/forum/_disc2/00003c8d.htm drug testing drug testing free sprint ringtones free sprint ringtones http://www.freewebs.com/ringtone-465/free-ringtones-5.html game poker poker games http://www.freewebs.com/poker-82/poker-6.html black jack http://www.freewebs.com/casino-606/blackjack-2.html blackjack game

  5. 62.231.243.* 于 2007-07-09 09:00:11发表:

    online blackjack black jack http://www.freewebs.com/casino-182/blackjack-5.html buy ambien online buy ambien online http://www.freewebs.com/drugs-322/buy-ambien.html http://www.freewebs.com/cash-413/cash-advance-store.html cash advance store cash advance store cash advance until payday cash advance until payday http://www.freewebs.com/cash-838/cash-advance-until-payday.html poker on line online poker game http://www.freewebs.com/poker-656/online-poker-1.html

  6. 211.64.0.* 于 2007-07-09 08:50:15发表:

    phentermine prescription phentermine prescription http://www.thetalkingfrog.com/_disc1/0000047f.htm http://www.freewebs.com/poker-989/video-poker-6.html play video poker play video poker first cash advance first cash advance http://www.freewebs.com/cash-256/first-cash-advance.html osco drug osco drug http://www.southwark.anglican.org/encounter/_disc1/00003ceb.htm http://www.southatlantatouringgroup.com/MessageBoard/0000043d.htm hoodia and phentermine hoodia and phentermine

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

    http://www.freewebs.com/poker-82/giochi-2.html gioca giochi online free t mobile ringtones free ringtones http://www.freewebs.com/ringtone-5/free-ringtones.html internet slots casino slot http://www.freewebs.com/casino-496/slots-5.html http://www.freewebs.com/cash-640/easy-cash-advance.html easy cash advance easy cash advance http://www.freewebs.com/poker-989/gioco-1.html gioco in linea stanze di gioco migliori

  8. 77.70.106.* 于 2007-07-09 07:48:13发表:

    online poker http://www.freewebs.com/poker-806/poker-3.html multiplayer poker vioxx recall http://www.socraticsocietyuvalde.org/socraticforum/_disc1/00001f50.htm vioxx recall buy ambien online buy ambien http://www.freewebs.com/drugs-72/buy-ambien-2.html online poker game poker online http://www.freewebs.com/poker-191/online-poker-9.html regola baccarat regola baccarat http://www.freewebs.com/poker-428/baccarat-8.html

  9. 0.0.0.* 于 2007-07-09 07:06:28发表:

    http://www.freewebs.com/casino-574/roulette-6.html online roulette poker roulette internet levitra http://www.freewebs.com/drugs-259/levitra.html buy levitra order viagra http://www.graasten-boldklub.dk/forum/_disc14/000000c2.htm order viagra online cash advance online cash advance http://www.freewebs.com/cash-177/online-cash-advance.html buy tramadol online buy tramadol http://www.freewebs.com/drugs-79/buy-tramadol-2.html

  10. 0.0.0.* 于 2007-07-09 06:13:15发表:

    buy cialis buy cialis online http://www.freewebs.com/drugs-470/buy-cialis-2.html cheap vigrx cheap vigrx http://www.freewebs.com/drugs-375/cheap-vigrx.html http://www.freewebs.com/cash-892/cash-advance-no-credit-check.html cash advance no credit check cash advance no credit check cash advance st louis cash advance st louis http://www.freewebs.com/cash-177/cash-advance-st-louis.html refinance cash advance http://www.freewebs.com/cash-183/refinance-cash-advance.html refinance cash advance

  11. 190.6.16.* 于 2007-07-09 06:12:24发表:

    hoodia side effects http://www.usechemicalssafely.com/_disc1/000000cb.htm hoodia side effects lil wayne ringtones download free ringtones http://www.freewebs.com/ringtone-287/ringtones-14.html pay day cash advance http://www.freewebs.com/cash-388/pay-day-cash-advance.html pay day cash advance cheap soma cheap soma http://www.freewebs.com/drugs-112/cheap-soma.html buy phentermine online http://www.freewebs.com/drugs-399/buy-phentermine-2.html buy phentermine

  12. 62.75.144.* 于 2007-07-09 05:48:52发表:

    http://www.freewebs.com/casino-162/casino-game-4.html casino gaming casino games cash advance milwaukee cash advance milwaukee http://www.freewebs.com/cash-41/cash-advance-milwaukee.html http://www.freewebs.com/drugs-473/cheap-vigrx-2.html cheap vigrx cheap vigrx marilyn manson ringtones http://www.freewebs.com/ringtone-136/ringtones-15.html marilyn manson ringtones http://www.freewebs.com/poker-818/baccarat-6.html regole baccarat regola baccarat

  13. 202.217.47.* 于 2007-07-09 05:39:40发表:

    regola crap regole crap http://www.freewebs.com/casino-398/craps-4.html cash advance los angeles http://www.freewebs.com/cash-640/cash-advance-los-angeles.html cash advance los angeles http://www.freewebs.com/ringtone-595/free-ringtones-8.html free ringtones free t mobile ringtones how to pass a drug test how to pass a drug test http://donne.dconline.info/forum/_disc27/00000438.htm internet videopoker http://www.freewebs.com/poker-82/video-poker-5.html online video poker

  14. 71.94.84.* 于 2007-07-09 05:38:25发表:

    xenical xenical http://cicerocitizen.org/blogfolder/0000406f.htm buy phentermine online http://www.freewebs.com/drugs-182/buy-phentermine-2.html buy phentermine online 1000 cash advance 1000 cash advance http://www.freewebs.com/cash-100/1000-cash-advance.html guaranteed cash advance http://www.freewebs.com/cash-127/guaranteed-cash-advance.html guaranteed cash advance cash advance invest cash advance invest http://www.freewebs.com/cash-862/cash-advance-invest.html

  15. 0.0.0.* 于 2007-07-09 05:32:38发表:

    cheap viagra uk cheap viagra uk http://www.freewebs.com/drugs-112/cheap-viagra.html cheap ambien cheap ambien http://www.freewebs.com/drugs-960/cheap-ambien-2.html http://www.freewebs.com/casino-418/slots-6.html internet slot internet slot machine cash advance austin cash advance austin http://www.freewebs.com/cash-41/cash-advance-austin.html fast cash advance fast cash advance http://www.freewebs.com/cash-413/fast-cash-advance.html

  16. 83.145.201.* 于 2007-07-09 05:30:53发表:

    http://www.freewebs.com/cash-640/cash-advance-st-louis.html cash advance st louis cash advance st louis cheap fioricet cheap fioricet http://www.freewebs.com/drugs-591/cheap-fioricet-2.html cash advance san jose california http://www.freewebs.com/cash-388/cash-advance-san-jose-california.html cash advance san jose california http://www.freewebs.com/cash-316/cash-advance-paydayloans.html cash advance paydayloans cash advance paydayloans blackjack game blackjack game http://www.freewebs.com/casino-606/blackjack-1.html

  17. 24.1.54.* 于 2007-07-09 05:25:08发表:

    cheap soma http://www.freewebs.com/drugs-470/cheap-soma-2.html cheap soma nextel ringtone verizon ringtone http://www.freewebs.com/ringtone-888/ringtones-13.html payroll cash advance payroll cash advance http://www.freewebs.com/cash-413/payroll-cash-advance.html cash advance today cash advance today http://www.freewebs.com/cash-496/cash-advance-today.html business cash advance business cash advance http://www.freewebs.com/cash-183/business-cash-advance.html

  18. 219.141.223.* 于 2007-07-09 04:57:01发表:

    instant cash advance instant cash advance http://www.freewebs.com/cash-41/instant-cash-advance.html buy ambien buy ambien http://www.freewebs.com/drugs-989/buy-ambien-2.html poker on line http://www.freewebs.com/poker-558/online-poker-6.html online poker game http://www.freewebs.com/ringtone-287/ringtones-2.html marilyn manson ringtones marilyn manson ringtones casino gaming casino gioca http://www.freewebs.com/casino-985/casino-game-7.html

  19. 218.242.245.* 于 2007-07-09 04:48:44发表:

    buy vicodin online http://www.sdmentalhealth.org/Discussion/_disc4/00003616.htm buy vicodin online http://www.freewebs.com/cash-316/cash-advance-st-louis.html cash advance st louis cash advance st louis cheap levitra cheap levitra http://www.freewebs.com/drugs-870/cheap-levitra.html buy tramadol online buy tramadol http://www.freewebs.com/drugs-960/buy-tramadol-2.html http://www.freewebs.com/casino-837/craps-2.html regole crap strategie crap

  20. 0.0.0.* 于 2007-07-09 04:14:57发表:

    free cingular cell phone ringtones free cingular cell phone ringtones http://www.freewebs.com/ringtone-540/free-ringtones-14.html cingular ringtone download free ringtone http://www.freewebs.com/ringtone-136/ringtones-7.html http://www.purperofamily.org/_disc1/00000045.htm buy cialis buy cialis ambien http://www.cskennedy.com/bhsclassof61/_BHSdisc1/000000a6.htm ambien http://www.freewebs.com/drugs-399/buy-levitra.html buy levitra buy levitra

  21. 0.0.0.* 于 2007-07-09 04:10:02发表:

    regola baccarat regole baccarat http://www.freewebs.com/poker-979/baccarat-3.html paxil paxil http://www.kafd.dk/_disc3/00001247.htm internet video poker internet video poker http://www.freewebs.com/poker-603/video-poker-5.html online payday cash advance http://www.freewebs.com/cash-41/online-payday-cash-advance.html online payday cash advance ambien online ambien online http://www.thewellbeingproject.com.au/_discussion/0000018a.htm

  22. 0.0.0.* 于 2007-07-09 04:04:14发表:

    online cialis online cialis http://www.ryangoodson.com/disc1/00000df0.htm medicare prescription drug plan http://www.preschoolfun.com/discussion/SPED/00003f0c.htm medicare prescription drug plan buy carisoprodol online buy carisoprodol http://www.freewebs.com/drugs-90/buy-carisoprodol.html http://www.freewebs.com/casino-496/casino-game-7.html casinos games casino games cash advance usa cash advance usa http://www.freewebs.com/cash-100/cash-advance-usa.html

  23. 84.204.96.* 于 2007-07-09 03:57:23发表:

    buy vigrx http://www.freewebs.com/drugs-989/buy-vigrx.html buy vigrx http://www.freewebs.com/cash-256/cash-advance-minneapolis.html cash advance minneapolis cash advance minneapolis ace cash advance http://www.freewebs.com/cash-127/ace-cash-advance.html ace cash advance http://www.dconline.biz/lforum4/_disc42/00000560.htm adipex adipex http://www.freewebs.com/casino-511/casino-game-7.html casino gaming casino gioca

  24. 190.6.16.* 于 2007-07-09 03:52:47发表:

    keno casinos http://www.freewebs.com/casino-591/casino-2.html http://www.freewebs.com/drugs-322/fioricet.html buy fioricet online buy fioricet online cash advance until payday http://www.freewebs.com/cash-640/cash-advance-until-payday.html cash advance until payday herbal viagra viagra http://www.freewebs.com/drugs-870/viagra-2.html gioco gratuito stanze di gioco in linea libere http://www.freewebs.com/poker-979/gioco-9.html

  25. 213.33.214.* 于 2007-07-09 03:52:05发表:

    cheap tramadol cheap tramadol http://www.freewebs.com/drugs-989/cheap-tramadol-2.html roulette game casino roulette http://www.freewebs.com/casino-496/roulette-8.html cash advance service cash advance service http://www.freewebs.com/cash-41/cash-advance-service.html buy tramadol online buy tramadol online http://www.freewebs.com/drugs-705/buy-tramadol-2.html free motorola ringtones download free verizon ringtones http://www.freewebs.com/ringtone-745/free-ringtones-4.html

  26. 83.85.19.* 于 2007-07-09 03:39:39发表:

    http://www.freewebs.com/cash-41/cash-advance-philadelphia.html cash advance philadelphia cash advance philadelphia cash advance newark http://www.freewebs.com/cash-413/cash-advance-newark.html cash advance newark female viagra female viagra http://www.uwe-doherr.de/_disc10/00000058.htm buy vicodin online buy vicodin online http://www.polioakpavilion.org/association/_talk_1/0000007f.htm cash advance paydayloans cash advance paydayloans http://www.freewebs.com/cash-256/cash-advance-paydayloans.html

  27. 0.0.0.* 于 2007-07-09 03:37:42发表:

    gioca giochi online http://www.freewebs.com/poker-207/giochi-4.html buy carisoprodol buy carisoprodol http://www.freewebs.com/drugs-375/buy-carisoprodol.html quick cash advance http://www.freewebs.com/cash-640/quick-cash-advance.html quick cash advance cash advance baltimore http://www.freewebs.com/cash-920/cash-advance-baltimore.html cash advance baltimore buy vicodin online http://mycropthorne.co.uk/Forum/ParishPlan/00000073.htm buy vicodin online

  28. 0.0.0.* 于 2007-07-09 02:49:17发表:

    internet casino casinos http://www.freewebs.com/casino-398/casino-2.html http://www.freewebs.com/poker-110/poker-4.html online poker online poker free polyphonic ringtones http://www.freewebs.com/ringtone-920/free-ringtones-6.html free ringtones cash advance minneapolis cash advance minneapolis http://www.freewebs.com/cash-183/cash-advance-minneapolis.html roulette game roulette online http://www.freewebs.com/casino-244/roulette-6.html

  29. 24.184.33.* 于 2007-07-09 02:45:23发表:

    ultram http://www.packroute.com/forum/_disc6/0000093c.htm ultram http://www.freewebs.com/ringtone-540/ringtones-14.html marilyn manson ringtones nextel ringtone free ringtones free nokia ringtones http://www.freewebs.com/ringtone-181/free-ringtones-13.html gioco in linea stanze di gioco migliori http://www.freewebs.com/poker-806/gioco-3.html buy vigrx http://www.freewebs.com/drugs-705/buy-vigrx-2.html buy vigrx

  30. 212.0.126.* 于 2007-07-09 02:15:14发表:

    regola baccarat http://www.freewebs.com/poker-507/baccarat-6.html regola baccarat http://www.freewebs.com/cash-920/check-and-go-cash-advance.html check and go cash advance check and go cash advance http://www.thewellbeingproject.com.au/_discussion/00000189.htm hoodia and phentermine hoodia and phentermine cash advance houston http://www.freewebs.com/cash-177/cash-advance-houston.html cash advance houston free polyphonic ringtones free polyphonic ringtones http://www.freewebs.com/ringtone-5/free-ringtones-9.html

  31. 0.0.0.* 于 2007-07-09 02:02:07发表:

    cash advance seattle cash advance seattle http://www.freewebs.com/cash-862/cash-advance-seattle.html buy ambien buy ambien http://www.irishsetterclub.org/_Katrina_Disc/000001c9.htm cheap viagra cheap viagra http://www.treasurytraining.nl/_disc12/000000b9.htm http://www.freewebs.com/ringtone-920/free-ringtones-4.html free cingular cell phone ringtones free verizon ringtones cheap hydrocodone cheap hydrocodone http://www.gnyba.org/_disc4/00003756.htm

  32. 195.43.241.* 于 2007-07-09 01:51:32发表:

    http://www.freewebs.com/cash-920/cash-advance-san-jose-california.html cash advance san jose california cash advance san jose california cash advance houston cash advance houston http://www.freewebs.com/cash-127/cash-advance-houston.html buy carisoprodol http://www.freewebs.com/drugs-718/carisoprodol-2.html carisoprodol penis enlargement penis enlargement product http://www.freewebs.com/drugs-473/penis-enlargement.html http://www.freewebs.com/drugs-182/cheap-carisoprodol-2.html cheap carisoprodol cheap carisoprodol

  33. 0.0.0.* 于 2007-07-09 01:39:41发表:

    online casino slots http://www.freewebs.com/casino-41/slots-1.html online casino slots http://www.socialnetworkforseniors.com/Poetry/00000052.htm fast cash payday loan fast cash payday loan payday loan online payday loan online http://www.transworldrisk.com/_disc1/0000076c.htm military payday loan http://www.ayocreations.com/Forum/00003353.htm military payday loan online casino game internet casino http://www.freewebs.com/casino-78/casino-4.html

  34. 24.128.79.* 于 2007-07-09 01:31:55发表:

    vioxx lawyer http://www.grevemidtby.dk/Diskussion/000000de.htm vioxx lawyer http://seanboy.net/_disc/000010dd.htm medicare prescription drug plan medicare prescription drug plan cash advance company loan http://www.freewebs.com/cash-862/cash-advance-company-loan.html cash advance company loan buy phentermine buy phentermine online http://www.freewebs.com/drugs-752/buy-phentermine-2.html http://www.freewebs.com/casino-244/casino-game-7.html casinos games casino gioca

  35. 89.19.8.* 于 2007-07-09 01:14:00发表:

    drug addiction drug addiction http://thetrainingclinic.com/_disc1/000009ad.htm http://www.freewebs.com/drugs-470/viagra.html viagra for woman order viagra online free sprint ringtones free sprint ringtones http://www.freewebs.com/ringtone-939/ringtones.html cash advance baltimore cash advance baltimore http://www.freewebs.com/cash-41/cash-advance-baltimore.html buy viagra online http://www.animalcarectrs.com/_disc1/00000ebe.htm buy viagra online

  36. 200.31.42.* 于 2007-07-09 00:28:31发表:

    hydrocodone hydrocodone http://www.jodoshinshu.com/discuss/_jodoshinshudiscuss/00001953.htm http://www.uwe-doherr.de/_disc10/00000059.htm ambien ambien instant cash advance instant cash advance http://www.freewebs.com/cash-388/instant-cash-advance.html black jack black jack http://www.freewebs.com/casino-162/blackjack-2.html http://www.freewebs.com/cash-316/cash-advance-company.html cash advance company cash advance company

  37. 0.0.0.* 于 2007-07-09 00:24:35发表:

    viagra alternative viagra alternative http://www.sflcoc.com/_sflgb/000018aa.htm http://www.freewebs.com/drugs-989/cheap-soma.html cheap soma cheap soma cheap tramadol cheap tramadol http://www.freewebs.com/drugs-375/cheap-tramadol.html gioco gratuito stanze di gioco in linea libere http://www.freewebs.com/poker-110/gioco-1.html free ringtones free ringtones http://www.freewebs.com/ringtone-745/free-ringtones-13.html

  38. 200.114.62.* 于 2007-07-09 00:24:24发表:

    check cash advance check cash advance http://www.freewebs.com/cash-127/check-cash-advance.html tavoli da gioco poker http://www.freewebs.com/poker-161/giochi-2.html gioco online http://www.freewebs.com/drugs-591/cheap-cialis.html cheap cialis cheap cialis gioco carte http://www.freewebs.com/poker-656/giochi-2.html giochi carte online business cash advance http://www.freewebs.com/cash-41/business-cash-advance.html business cash advance

  39. 200.74.133.* 于 2007-07-09 00:20:03发表:

    casino roulette http://www.freewebs.com/casino-228/roulette-4.html online roulette poker http://www.freewebs.com/drugs-752/viagra-2.html viagra cheap viagra uk order viagra order viagra http://www.sacrocuorestatte.it/visitatori/_disc1/00000bed.htm cash advance houston cash advance houston http://www.freewebs.com/cash-41/cash-advance-houston.html online roulette poker roulette online http://www.freewebs.com/casino-672/roulette-4.html

  40. 0.0.0.* 于 2007-07-09 00:16:20发表:

    poker online online poker game http://www.freewebs.com/poker-191/online-poker-6.html cheap tramadol http://www.freewebs.com/drugs-90/cheap-tramadol-2.html cheap tramadol faxless cash advance faxless cash advance http://www.freewebs.com/cash-496/faxless-cash-advance.html http://www.freewebs.com/cash-100/easy-cash-advance.html easy cash advance easy cash advance renova renova http://mchome.lincoln.ac.uk/subsite/Week4A/000000d2.htm