作者abow1225 (阿毛~)
看板EE_DSnP
標題[問題]g++的問題
時間Tue Mar 3 00:46:44 2009
請問板上各位大大
想請問一下很簡單的問題,就是我用VI寫好一個簡單的程式,
然後使用g++ -o test test.cpp想編譯一下,
不過它卻跑出function definition does not declare parameters的訊息
請問是出了甚麼問題?還是有甚麼套件我沒有裝?
我用的是unbuntu,安裝過的套件有
sudo apt-get install g++
sudo apt-get install libcppunit-dev
sudo apt-get install build-essential
sudo apt-get install ddd
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.38.125
1F:推 timrau:猜測test.cpp的內容才是關鍵 03/03 00:56
2F:推 ric2k1:try "which test"? 03/03 01:05
3F:→ abow1225:我打了which test,它顯示/user/bin/test 03/03 02:06
4F:→ abow1225:剛打錯,是/usr/bin/test 03/03 02:15
5F:→ abow1225:找到問題所在了,好像不能用test當檔名,我換成BBB後就OK 03/03 02:24
6F:推 ric2k1:or execute "./test", that will be OK. 03/03 09:08