CentOS安装Code::Blocks

http://my.oschina.net/vaero/blog/210488

CentOS安装Code::Blocks
1) 前提

# 检查GTK版本,至少2.0
yum list installed *gtk*  # 或下行命令
# ll /usr/lib/ | grep gtk  # 有类似"libgtk-x11-2.0.so"否

# 安装wxGTK
# yum list wxGTK*  # 查看
yum install wxGTK.i686 wxGTK-devel.i686 -y
# 源码安装见参考1

# 安装SVN
yum install subversion -y
svn help  # 查看帮助

2) 安装

cd /opt/Backup/
# SVN获取C::B源码
svn co svn://svn.code.sf.net/p/codeblocks/code/trunk codeblocks

cd codeblocks/
# 设置配置脚本及依赖,只需运行一次。可能会遇到"Issue 1"
./bootstrap
# 配置时指定目录并安装插件。可能会遇到"Issue 234"
./configure \
--prefix=/opt/codeblocks \
--with-contrib-plugins=all
# 编译
make
# 安装
make install

cd /opt/codeblocks/bin/
./codeblocks &

Issue 1: ./bootstrap: line 66: libtoolize: command not found

yum install libtool -y

Issue 2: checking for HUNSPELL… configure: error: Package requirements (hunspell) were not met:

yum install hunspell -y
# However: Package hunspell-1.2.8-16.el6.i686 already installed and latest version
# yum list installed hunspell*,已经安装有了。
yum install hunspell-devel -y

Issue 3: checking for GAMIN… configure: error: Package requirements (gamin) were not met:

yum install gamin gamin-devel -y

Issue 4: configure: error: needed boost headers not found or not usable

yum install boost boost-devel -y

其他问题见参考1。
3) 其他

# 安装gdb
yum install gdb -y

# 建立软链接
ln -s /opt/codeblocks/bin/codeblocks /usr/bin/codeblocks
# 建立桌面快捷
cd /usr/share/applications
vi codeblocks.desktop
# 写入内容

codeblocks.desktop:

[Desktop Entry]
Version=1.0
Type=Application
Name=Code::Blocks
GenericName=IDE
Comment=The open source, cross platform, free C, C++ and Fortran IDE
Exec=/opt/codeblocks/bin/codeblocks %F
Terminal=false
MimeType=application/x-codeblocks;application/x-codeblocks-workspace;
Icon=/opt/codeblocks/share/codeblocks/icons/app_64.xpm
Categories=IDE;Development;
StartupNotify=true

然后,于"Applications > Programming > Code::Blocks"右键"Add this launcher to desktop”

ps: 配置,调试,快捷以及Windows上安装编译等,参考:Code::Blocks。

Issue 1: Process terminated with status 255 (0 minute(s), 0 second(s))

控制台程序运行时,未打印东西,而是报了如上信息。

yum install xterm -y

4) 参考
    Installing Code::Blocks from source on Linux


阅读(64) | 评论(0) | 转发(0) |
0

上一篇:How to Dual boot Multiple ROMs on Your Android SmartPhone (Upto Five Roms)?

下一篇:How To Build CyanogenMod Android for smartphone

相关热门文章
  • test123
  • 编写安全代码——小心有符号数...
  • 使用openssl api进行加密解密...
  • 一段自己打印自己的c程序...
  • sql relay的c++接口
  • linux dhcp peizhi roc
  • 关于Unix文件的软链接
  • 求教这个命令什么意思,我是新...
  • sed -e "/grep/d" 是什么意思...
  • 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
评论热议

你可能感兴趣的:(C/C++)