标签:
1. 安装gcc
yum -y install gcc
yum -y install gcc-c++
2. 安装gtk2-level
yum -y install gtk2*
3安装wxWidgets(又叫wxGTK)
由于CodeBlocks是基于wxWidgets开发的,需要首先安装wxWidgets,然后才能够安装CodeBlocks,一个可用的地址是:
http://sourceforge.net/projects/wxwindows/files/3.0.2/wxWidgets-3.0.2.tar.bz2
用wget获取,没有就yum -y install wget;
tar -zxvf解压缩后:
./configure
./make
./make install
4.安装codeblocks
一个可用的地址是:http://sourceforge.net/projects/codeblocks/files/Sources/16.01/codeblocks_16.01.tar.gz
tar -zxvf解压缩后:
安装以下内容,否则configure不成功。
安装hunspell
yum -y install hunspell
yum -y install hunspell-devel
安装gamin
yum -y install gamin
yum -y install gamin-devel
安装boost
yum install boost
yum install boost-devel
./configure
./make
./make install
解压缩然后依次执行下面的命令:
bootstrap
./bootstrap
bootstrap命令的作用是设置configure脚本及其依赖关系,这个命令只需要执行一次,运行这个命令如果出现下面的错误:
./bootstrap: libtoolize: not found
说明机子上没有安装“libtool”,yum安装下即可:
yum install libtool
重新运行
1
|
./bootstrap |
可能会报错
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
[root@localhost
codeblocks-13.12]# ./bootstrap Found
revision: ‘0‘ ‘‘ libtoolize:
putting auxiliary files in `.‘. libtoolize:
copying file `./ltmain.sh‘ libtoolize:
putting macros in AC_CONFIG_MACRO_DIR, `m4‘. libtoolize:
copying file `m4/libtool.m4‘ libtoolize:
copying file `m4/ltoptions.m4‘ libtoolize:
copying file `m4/ltsugar.m4‘ libtoolize:
copying file `m4/ltversion.m4‘ libtoolize:
copying file `m4/lt~obsolete.m4‘ configure.ac:86:
warning: macro `AM_OPTIONS_WXCONFIG‘ not found in library configure.ac:87:
warning: macro `AM_PATH_WXCONFIG‘ not found in library configure.ac:86:
error: possibly undefined macro: AM_OPTIONS_WXCONFIG If
this token and others are legitimate, please use m4_pattern_allow. See
the Autoconf documentation. configure.ac:87:
error: possibly undefined macro: AM_PATH_WXCONFIG |
解决方法:
1
|
cp
../wxWidgets-2.8.12/wxwin.m4 /usr/share/aclocal //wxwin.m4文件在解压的文件包里 |
configure
./configure
接下来安装等待即可:
make make install
等安装完成后,就可以在Application中找到Code::Blocks IDE的图标了。
启动并创建快捷方式
双击桌面图标就能启动了。
标签:
原文地址:http://blog.csdn.net/hbtj_1216/article/details/51364503