回文章列表
作者closedpath.bbs@ptt.cc (closed) 看板: linux
標題[問題] 一個很笨,有關gcc的問題
時間批踢踢實業 (2008/07/06 Sun 18:16:26)
//---------以下是程式碼:---------------------

#include <stdio.h>

int main()
{
    printf("Hello World\n");
    exit(0);
}


//--------------------------------------------
我下了這個指令
$gcc -c hello.c

卻產生錯誤訊息
hello.c: 在函式 「main」 中:
hello.c:6: 警告: 隱含宣告與內建函式 「exit」 不相容

請問該怎麼解決呢?

--
※ 發信站: 批踢踢實業坊(ptt.cc) 
◆ From: 220.132.4.196
文章選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻