Linux下Code::Blocks無法編譯運行提示 /bin/sh: 1: g++ not found 的解決辦法
今天在Ubuntu 12.04 軟件中心中選裝了Code::Blocks,安裝完成後卻連最簡單的hello world 都無法編譯運行。
編譯時提示
/bin/sh: 1: g++: not found
運行時總提示
It seems that this file has not been built yet.
Do you want to build it now?
因為系統沒有裝C++編譯器
安裝相應編譯器即可解決此問題(依據系統軟件安裝方式):
(ubuntu下)
sudo apt-get install g++
(Fedora下安裝)
sudo yum install gcc-c++
Code::Blocks 的詳細介紹:請點這裡
Code::Blocks 的下載地址:請點這裡
Ubuntu 12.04 下安裝Code::Block 見 http://www.linuxidc.com/Linux/2012-10/73116.htm
更多Ubuntu相關信息見Ubuntu 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=2