安装版本:
codeblocks-20.03.tar.bz2
wxWidgets-3.0.5.tar.bz2
codeblocks 官方给出的安装文档:http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux
1、安装gtk2-devel yum install gtk2* 2、wxWidgets安装 tar jzvf wxWidgets-3.0.5.tar.bz2 cd wxWidgets-3.0.5
mkdir build_gtk2_shared_monolithic_unicode
cd build_gtk2_shared_monolithic_unicode
../configure --prefix=/opt/wx/3.0 \
--enable-xrc \
--enable-monolithic \
--enable-unicode
make
su
make install
exit
注:我用 codeblocks_12.11-1.tar.gz 没有编译过去
3、设置环境变量:
Add /opt/wx/3.0/bin to the PATH (if your shell is bash then edit /etc/profile or ~/.bash_profile) (On Suse 10.1 edit /etc/profile.local, it will only be available after a new login). An example PATH:
export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH
4、添加动态库共享,立刻生效
ldconfig source /etc/profile
5、安装Code::Blocks
./bootstrap 说明:This sets up the configure script and its dependencies. It only needs to be run once
cp ../wxwin.m4 /usr/share/aclocal
./configure --with-wx-config=/opt/wx/3.0/bin/wx-config
make
make install