Ubuntu一般有gcc可以直接用啊,但是要自己写Makefile,或者你装个CodeBlocks
CodeBlocks使用wxWidgets写的界面,先安装wxWidgets,一般下载源代码包,后缀为tar.gz的,打开终端,输入sudo tar -zxvf 包名字,解压后在终端中进入刚刚解压的得到的目录,输入./configure(生成Makefile)、然后输入make,make完成之后输入sudo make install即完成安装,建议下载deb包,输入sudo dpkg -i 包名字
perform the upcoming commands in the terminal(system>>accessory>>terminal)
$ sudo apt-get install build-essential
# waiting...
$ mkdir cpp
$ cd cpp
$ vim test.cpp
//~ edit test.cpp with vim or other editor like the upcoming lines.
#include
using namespace std;
int
main()
{
cout<<"hello, world"<
}
$ g++ test.cpp -o test
$ ls
test.cpp test
$ ./test
$ hello, world
for more details, you could visit this page I ever edited.
打开一个控制台,执行g++,如果系统提示找不到命令,表示你的Ubuntu尚未安装gcc,可以通过sudo apt-get install build-essential来安装,注意,执行安装命令需要提供root密码,同时需要连接网络。
GCC是Liunx下的C/C++编译器,如果你要在Liunx下开发C++程序的话就用这个。
至于软件安装你可以百度下,网上有详细的教程。
在“新立得软件管理器”里有一个gcc,挺好用而且强大。你打开“新立得软件管理器”找一下吧!!