今天自己把CODEBLOCK安装了一下,给大家参考
关于安装过程总结起来可以分为以下几个步骤:
1.
wxGTK
我所使用的版本下载地址为:
http://nchc.dl.sourceforge.net/sourceforge/wxwindows/wxGTK-2.8.10.tar.gz
2.
依次输入如下命令进行安装:
tar zxvf wxGTK-2.8.10.tar.gz
cd wxGTK-2.8.10
./configure --enable-xrc--enable-monolithic --enable-unicode
make
make install
其中的
这里可能会碰到一定的错误:
1. checking for GTK+ - version >= 2.0.0... no
2. *** Could not run GTK+ test program, checking why...
3. *** The test program failed to compile or link. See the file config.log for the
4. *** exact error that occured. This usually means GTK+ is incorrectly installed.
5. configure: error:
6. The development files for GTK+ were not found. For GTK+ 2, please
7. ensure that pkg-config is in the path and that gtk+-2.0.pc is
8. installed. For GTK+ 1.2 please check that gtk-config is in the path,
9. and that the version is 1.2.3 or above. Also check that the
10. libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
11. --libs' are in the LD_LIBRARY_PATH or equivalent.
解决的办法是:sudo apt-get install libgtk2.0-dev 因为有一写库没安装。
3.
Code::Block
我所使用的版本下载地址为:
http://ncu.dl.sourceforge.net/sourceforge/codeblocks/codeblocks-8.02-src.tar.bz2
4.
依次输入如下命令进行安装:
tar jxfcodeblocks-8.02-src.tar.bz2
cd codeblocks-8.02
./configure –prefix=/usr
make
make install
这里面将其安装于
这里make 可能会出问题 :
prefix.cpp: 在函数‘char* br_extract_dir(const char*)’中: prefix.cpp:396:26。。。。。。。。。。。。。。。。
不要担心: vi 进入那个文件把文件修改一下 把396行改为: end =(char *) strrchr (path, '/');
还有一行也这样该,就所在前面加一个(char *)这是因为新版本的G++不支持报错功能了。
5.
因为在安装
库文件路径指向方法:
vi/etc/ld.so.conf
在文件最后输入:
保存后,运行
按照上述配置路径就应该没有什么问题,否则就会出现运行
6.
可以通过以下操作的输出检索安装是否正确
wx-config--prefix
wx-config --libs
which wx-config
7.
9.
需要下载一个中文语言包:
下载地址:
http://www.d2school.com/codeblocks/download/d2school_codeblocks_chinese_locale.7z
在
有人说还需要下面的操作,其实是不需要的,打开之后就是中文了:
启动
Chinese(Simplified)
10.
费了老半天的劲把
原因很简单