CentOS安装Code::Blocks

来源:互联网 发布:淘宝金鹰男士 假货 编辑:程序博客网 时间:2024/06/07 01:09

转载自 http://my.oschina.net/vaero/blog/210488

1) 前提

# 检查GTK版本,至少2.0yum 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# 安装SVNyum install subversion -ysvn help  # 查看帮助

2) 安装

cd /opt/Backup/# SVN获取C::B源码svn co svn://svn.code.sf.net/p/codeblocks/code/trunk codeblockscd codeblocks/# 设置配置脚本及依赖,只需运行一次。可能会遇到"Issue 1"./bootstrap# 配置时指定目录并安装插件。可能会遇到"Issue 234"./configure \--prefix=/opt/codeblocks \--with-contrib-plugins=all# 编译make# 安装make installcd /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) 其他

# 安装gdbyum install gdb -y# 建立软链接ln -s /opt/codeblocks/bin/codeblocks /usr/bin/codeblocks# 建立桌面快捷cd /usr/share/applicationsvi codeblocks.desktop# 写入内容

codeblocks.desktop:

[Desktop Entry]Version=1.0Type=ApplicationName=Code::BlocksGenericName=IDEComment=The open source, cross platform, free C, C++ and Fortran IDEExec=/opt/codeblocks/bin/codeblocks %FTerminal=falseMimeType=application/x-codeblocks;application/x-codeblocks-workspace;Icon=/opt/codeblocks/share/codeblocks/icons/app_64.xpmCategories=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) 参考

  1. Installing Code::Blocks from source on Linux
0 0