1.安裝gcc
yum-yinstallgcc
yum-yinstallgcc-c++
2.安裝gtk2-level
yum-yinstallgtk2*
3安裝wxWidgets(又叫wxGTK)
由於CodeBlocks是基於wxWidgets開發的,需要首先安裝wxWidgets,然後才能夠安裝CodeBlocks,一個可用的地址是:
http://sourceforge.net/projects/wxwindows/files/3.0.2/wxWidgets-3.0.2.tar.bz2
用wget獲取,沒有就yum-yinstallwget;
tar-zxvf解壓縮後:
./configure
./make
./makeinstall
4.安裝codeblocks
一個可用的地址是:http://sourceforge.net/projects/codeblocks/files/Sources/16.01/codeblocks_16.01.tar.gz
tar-zxvf解壓縮後:
安裝以下內容,否則configure不成功。
安裝hunspell
yum-yinstallhunspell
yum-yinstallhunspell-devel
安裝gamin
yum-yinstallgamin
yum-yinstallgamin-devel
安裝boost
yuminstallboost
yuminstallboost-devel
./configure
./make
./makeinstall
解壓縮然後依次執行下面的命令:
bootstrap
./bootstrap
bootstrap命令的作用是設置configure腳本及其依賴關系,這個命令只需要執行一次,運行這個命令如果出現下面的錯誤:
./bootstrap: libtoolize: not found
說明機子上沒有安裝“libtool”,yum安裝下即可:
yum install libtool
重新運行
1./bootstrap
可能會報錯
12345678910111213141516[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
解決方法:
1cp ../wxWidgets-2.8.12/wxwin.m4 /usr/share/aclocal //wxwin.m4文件在解壓的文件包裡
configure
./configure
接下來安裝等待即可:
makemake install
等安裝完成後,就可以在Application中找到Code::Blocks IDE的圖標了。
啟動並創建快捷方式
啟動並創建快捷方式在桌面上點鼠標右鍵,選擇“創建啟動器”,並輸入如下路徑:/usr/local/bin/codeblocks雙擊桌面圖標就能啟動了。
http://xxxxxx/Linuxjc/1134310.html TechArticle