CentOS安装codeblocks

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 IDEExec=/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) 参考

  1. Installing Code::Blocks from source on Linux
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值