目前連編譯 helloworld.c 都沒辦法成功 (gcc helloworld.c)
error是說找不到標頭檔
在網路上找了很多方法,
例如:
灌g++, build-essential
sudo apt-get install g++
sudo apt-get install build-essential
不過仍舊沒辦法成功
都說找不到
Couldn't find package build-essential
Couldn't find package g++
(gcc 已是最新版本)
請問是哪裡有問題嗎?
需要怎嚜弄呢?
非常感謝~!!
error message shows: test.c: 1: 19: error: stdio.h: No such file or directory test.c: In function 'main' test.c: 5: warning: incompatible implicit declaration of built-in function 'printf'
Result after I typed dpkg -l | grep gcc: ii gcc 4:4.2.3-lubuntu3 The GNU C compiler ii gcc-4.2 4.2.3-2ubuntu7 The GNU C compiler (continue..)
(continue) ii gcc-4.2-base 4.2.3-2ubuntu7 The GNU Compiler Collection (Base Package) ii libgcc1 1:4.2.3-2ubuntu7 GCC suport library
After I try the following instructions through my dorm network sudo apt-get install g++ sudo apt-get install build-essential finally i can compile and run helloworld.c However i still worry about that i saw many updates failed, don't know if it'll cause problems...?