1. 安装wxWidgets
tar -xvf wxWidgets-3.0.1.tar.bz2
[root@luozhonghua codeblocks]# cd wxWidgets-3.0.1 [root@luozhonghua wxWidgets-3.0.1]# ./configure && make && make install
#特别注意不要带参数(路径)安装,免得后面发生意外
2.1 LD_LIBRARY_PATH环境配置
查看环境变量:
[root@luozhonghua codeblocks]# wx-config --libs -L/usr/local/lib -pthread -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0
将路径添加到系统环境:
vi /etc/profile 最后一行加上: export LD_LIBRARY_PATH="-L/usr/local/lib -pthread -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0"
使其立即生效:
[root@luozhonghua codeblocks]# source /etc/profile
检测:
[root@luozhonghua codeblocks]# export -p
3.1 安装codeblocks
下载 wget http://www.codeblocks.org/downloads/26#linux64/codeblocks_13.12-1.tar.gz
tar -xvf codeblocks_13.12-1.tar.gz cd codeblocks_13.12-1 mkdir /opt/codeblocks
yum install gamin-devel yum install hunspell-devel
./bootstrap ./configure --prefix=/opt/codeblocks --with-contrib-plugins=all make && make install