CentOS6.5编译安装CodeBlocks13.12

来源:互联网 发布:steam动态桌面软件 编辑:程序博客网 时间:2024/06/08 12:21
在CentOS6.5上安装Codelocks的过程。

1.安装gcc,需要c和c++两部分,默认安装下,CentOS不安装编译器的,在终端输入以下命令即可
yum install gcc
yum install gcc-c++

2.安装gtk2-devel,因为默认已经安装了正式产品需要的支持库,但是没有安装开发所需要的文档.
yum install gtk2*

3. 安装wxGTK,下载地址http://pkgs.repoforge.org/wxGTK/,需要下面两个文件:
wxGTK-devel-2.8.12-1.el6.rf.x86_64.rpm 
wxGTK-2.8.12-1.el6.rf.x86_64.rpm   

使用rpm命令或者双击安装

或者用源码安装

http://www.wxwidgets.org/downloads/下载目前最新版本: wxGTK-2.8.12.tar.gz

对wxGTK解紧缩,在解开的目次下履行,具体实行以下命令(需要在下面目录里面执行)

  1. tar -xzvf  wxGTK-2.8.12.tar.gz
  2. cd wxGTK-2.8.12
  3. ./configure --prefix=/usr --enable-xrc --enable-monolithic --enable-unicode
  4. make
  5. make install


4. 安装hunspell
yum install hunspell
yum install hunspell-devel

5. 安装gamin
yum install gamin
yum install gamin-devel

6. 安装gamin
yum install boost

yum install boost-devel

7. 编译并安装Code::Blocks
  1. tar -xzvf codeblocks_13.12-1.tar.gz
  2. cd codeblocks_13.12-1
  3. export ACLOCAL_FLAGS="-I `wx-config --prefix`/share/aclocal"
  4. ./bootstrap (这里有可能报错 ./bootstrap: line 66: libtoolize: command not found, 解决办法:yuminstall libtool -y)
  5. ./configure --with-contrib-plugins=all


8. 安装好后,在Application下会出现Programming菜单项,在这里可以启动codeblocks

9. 如果出现无法启动的情况,则:
编辑这个: /etc/ld.so.conf
最后添加: /usr/local/lib
然后运行: /sbin/ldconfig

10. 如果不出现调试的命令行窗口,则:
Settings -> 
Environment -> 
General settings -> 
Terminal to launch console programs ->
gnome-terminal --disable-factory -t $TITLE -x

11. 取消系统F10菜单键
安装gconf-editor: yum install gconf-editor

打开gconf-editor: desktop/gnome/interface/menubar_accel清空

12在编译程序的时候,如果出现Checking for existence这种错误,如下图,应该是由于显示终端配置错误。我们可以改成我们有的,打开Settings-->Enviroment...,然后再执行run应该就没什么问题了!

 


0 0
原创粉丝点击