轉(zhuǎn)載:http://www.ithao123.cn/content-10842983.html
驗證可以
1.安裝gcc,需要c和c++兩部分,默認安裝下,CentOS不安裝編譯器的,在終端輸入以下命令即可
yum install gcc
yum install gcc-c++
2.安裝gtk2-devel,因為默認已經(jīng)安裝了正式產(chǎn)品需要的支持庫,但是沒有安裝開發(fā)所需要的文檔.
yum install gtk2*
3. 安裝wxGTK(或者wxwidgets),下載地址:http://www.wxwidgets.org/downloads/,下載的文件為:wxWidgets-3.0.1.tar.bz2,
解壓之后,進入目錄后執(zhí)行命令
./configure --prefix=/usr --enable-xrc --enable-monolithic --enable-unicode
make
make install
4.
安裝codeblocks,下載codeblocks安裝包,下載地址:http://www.codeblocks.org/downloads/
這里有兩種方式進行安裝:
第一種方式是直接下載rpm包,可以直接進行安裝,但是rpm安裝形式,沒有默認安裝可視設(shè)計wxsmith。
第二種方式是下載源代碼包,后綴為.tar.gz(.tar.bz2),下載之后,解壓縮,進入目錄,執(zhí)行命令
./configure --prefix=/usr --with-contrib-plugins=all(如果只是./configure那默認情況是不會安裝可視設(shè)計wssmith,如果不需要圖形界面開發(fā)的話可以直接使用第一種安裝方式)
make
make install
ssue 1: ./bootstrap: line 66: libtoolize: command not found
yuminstalllibtool -y
Issue 2: checking for HUNSPELL… configure: error: Package requirements (hunspell) were not met:
yuminstallhunspell -y# However: Package hunspell-1.2.8-16.el6.i686 already installed and latest version# yum list installed hunspell*,已經(jīng)安裝有了。yuminstallhunspell-devel -y
Issue 3: checking for GAMIN… configure: error: Package requirements (gamin) were not met:
yuminstallgamin gamin-devel -y
Issue 4: configure: error: needed boost headers not found or not usable
yuminstallboost boost-devel -y
5.安裝好codeblocks后,在application下會出現(xiàn)programming菜單項,在這里可以啟動codeblocks.有時候也會出現(xiàn)無法啟動的情況,需要這樣做:
vim /etc/ld.so.conf
最后一行添加:/usr/local/lib
保存退出,然后運行/sbin/ldconfig
即可。
6.安裝一下xterm:yum install xterm
7.如果沒有看到codeblocks菜單項,可以:創(chuàng)建桌面啟動器如下:
1、點擊應(yīng)用程序--系統(tǒng)工具
2、選擇“啟動應(yīng)用程序”
3、在啟動用程序首選項中選擇“添加”
4、會出現(xiàn)和以前一樣的添加啟動程序?qū)υ捒?,進行設(shè)置
5、設(shè)置完名稱和命令(路徑)后,點擊“添加”,啟動器就被添加到列表里了
6、用鼠標選中剛添加的啟動其,將其拖到桌面
7、右擊新建的起動器,選擇屬性,在權(quán)限選項卡中勾選——執(zhí)行:允許以程序執(zhí)行文件
8、同上步,在基本選項卡中點擊圖標,可以設(shè)置啟動器的桌面圖標。