轉(zhuǎn)載:http://www.ithao123.cn/content-10842983.html
驗(yàn)證可以
1.安裝gcc,需要c和c++兩部分,默認(rèn)安裝下,CentOS不安裝編譯器的,在終端輸入以下命令即可
yum install gcc
yum install gcc-c++
2.安裝gtk2-devel,因?yàn)槟J(rèn)已經(jīng)安裝了正式產(chǎn)品需要的支持庫,但是沒有安裝開發(fā)所需要的文檔.
yum install gtk2*
3. 安裝wxGTK(或者wxwidgets)蚓土,下載地址:http://www.wxwidgets.org/downloads/,下載的文件為:wxWidgets-3.0.1.tar.bz2,
解壓之后谍咆,進(jìn)入目錄后執(zhí)行命令
./configure --prefix=/usr --enable-xrc --enable-monolithic --enable-unicode
make
make install
4.
安裝codeblocks牲蜀,下載codeblocks安裝包,下載地址:http://www.codeblocks.org/downloads/
這里有兩種方式進(jìn)行安裝:
第一種方式是直接下載rpm包憔披,可以直接進(jìn)行安裝,但是rpm安裝形式辩诞,沒有默認(rèn)安裝可視設(shè)計(jì)wxsmith课幕。
第二種方式是下載源代碼包,后綴為.tar.gz(.tar.bz2)露该,下載之后睬棚,解壓縮,進(jìn)入目錄解幼,執(zhí)行命令
./configure --prefix=/usr --with-contrib-plugins=all(如果只是./configure那默認(rèn)情況是不會(huì)安裝可視設(shè)計(jì)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下會(huì)出現(xiàn)programming菜單項(xiàng),在這里可以啟動(dòng)codeblocks.有時(shí)候也會(huì)出現(xiàn)無法啟動(dòng)的情況特铝,需要這樣做:
vim /etc/ld.so.conf
最后一行添加:/usr/local/lib
保存退出暑中,然后運(yùn)行/sbin/ldconfig
即可壹瘟。
6.安裝一下xterm:yum install xterm
7.如果沒有看到codeblocks菜單項(xiàng),可以:創(chuàng)建桌面啟動(dòng)器如下:
1鳄逾、點(diǎn)擊應(yīng)用程序--系統(tǒng)工具
2稻轨、選擇“啟動(dòng)應(yīng)用程序”
3、在啟動(dòng)用程序首選項(xiàng)中選擇“添加”
4雕凹、會(huì)出現(xiàn)和以前一樣的添加啟動(dòng)程序?qū)υ捒蚺咕悖M(jìn)行設(shè)置
5、設(shè)置完名稱和命令(路徑)后请琳,點(diǎn)擊“添加”粱挡,啟動(dòng)器就被添加到列表里了
6、用鼠標(biāo)選中剛添加的啟動(dòng)其俄精,將其拖到桌面
7询筏、右擊新建的起動(dòng)器,選擇屬性竖慧,在權(quán)限選項(xiàng)卡中勾選——執(zhí)行:允許以程序執(zhí)行文件
8嫌套、同上步,在基本選項(xiàng)卡中點(diǎn)擊圖標(biāo)圾旨,可以設(shè)置啟動(dòng)器的桌面圖標(biāo)踱讨。