wxWidgets安装
下载wxWidgets-3.1.0.tar.bz2,然后解压 tar -jxvf wxWidgets-3.1.0.tar.bz2
cd wxWidgets-3.1.0 //进入解压文件夹
mddir -p build //创建build文件夹
cd build //进入build文件夹
../configure
make
make install
这个印象中没有失败的地方。
安装其他的软件包
yum -y install gcc
yum -y install gcc-c++
yum -y install gtk2*
yum -y install libtool
yum -y install boost
yum -y install boost-devel
yum -y install libtool
等等,好像还有几个,在configure的时候会提醒你缺少xxx包,然后你就
yum -y install xxx
yum -y install xxx-devel
基本就能解决,具体缺少啥包实在忘了。
codeblocks 16.01安装
下载 http://sourceforge.net/project/codeblocks/files/Sources/16.01/codeblocks_16.01.tar.gz
tar -xzvf codeblocks_16.01.tar.gz 解压下载的压缩文件
cd codeblocks_16.01 进入解压文件夹
mkdir -p build 创建编译文件夹
cd build 进入编译文件夹
../bootstrap 执行
可能会报错
[root@localhost codeblocks-16.01]# ./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
解决方法:
cp ../wxWidgets-3.1.0/wxwin.m4 /usr/share/aclocal 注意mxwin.m4文件的位置,不要一动不动执行,这是我的环境,当前目录不同切记!
重新运行
../bootstrap
../configure --prefix=/usr--with-contrib-plugins=all
make
make install
注意:除解压外tar,其余都在root权限下执行。
成功在找到Applications/programming/Code::Blocks IDE,直接运行即可!
注意在Centos7下面的时候我记得不用执行bootstrap,也能编译成功!