Re: [問題] 一個很笨,有關gcc的問題

看板Linux作者時間17年前 (2008/07/07 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
※ 引述《closedpath.bbs@ptt.cc (closed)》之銘言: > //---------以下是程式碼:--------------------- > #include <stdio.h> > int main() > { > printf("Hello World\n"); > exit(0); // remove this return 0; > } > //-------------------------------------------- > 我下了這個指令 > $gcc -c hello.c > 卻產生錯誤訊息 > hello.c: 在函式 「main」 中: > hello.c:6: 警告: 隱含宣告與內建函式 「exit」 不相容 > 請問該怎麼解決呢? -- ◣ ▁▁ ▄▌ 楓橋驛站<bbs.cs.nthu.edu.tw> ▃▌ 來自: 124-8-73-160.dynamic.tfn.net.tw
文章代碼(AID): #18SGXV00 (Linux)
文章代碼(AID): #18SGXV00 (Linux)