CentOS6.3 下安装codeblocks
本人用的系统是centos6.3(虚拟机) 需要预先安装gcc编译器(参考:http://www.cnblogs.com/magialmoon/archive/2013/05/05/3061108.html)
1、先安装GTK+
yum install gtk+*
2、下载并安装<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13.92px; line-height: 20.88px;">wxGDK 下载地址:<a target=_blank href="http://www.wxwidgets.org/downloads/">wxGTK下载地址</a></span>
以<span style="font-family:Verdana, Arial, Helvetica, sans-serif;"><span style="font-size: 13.92px; line-height: 20.88px;">wxGTK-2.8.12.tar.gz为例</span></span>
<span style="font-family:Verdana, Arial, Helvetica, sans-serif;"><span style="font-size: 13.92px; line-height: 20.88px;">首先将它解压:</span></span><pre name="code" class="plain">tar zxvf wxGTK-2.8.12.tar.gz
cd wxGTK-2.8.12
安装:
<pre name="code" class="plain">mkdir build_gtk2_shared_monolithic_unicode
cd build_gtk2_shared_monolithic_unicode
./configure --prefix=/opt/wx/2.8 \
--enable-xrc \
--enable-monolithic \
--enable-unicode
make
su
make install
exit
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13.92px; line-height: 20.88px;">安装的路径是</span><span style="margin: 0px; padding: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13.92px; line-height: 20.88px; color: rgb(255, 0, 0);">/opt/wx/2.8/</span>
<span style="margin: 0px; padding: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13.92px; line-height: 20.88px;"><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13.92px; line-height: 20.88px;"><span style="color:#ff0000;">设置环境变量:</span></span></span><pre style="color: rgb(51, 51, 51); margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; border-radius: 4px; line-height: 20px; word-break: break-all; border: 0px solid rgba(0, 0, 0, 0.14902); border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; font-family: 'Courier New' !important; background-color: rgb(245, 245, 245);">export PATH=/usr/bin:/opt/wx/<span style="margin: 0px; padding: 0px; color: rgb(128, 0, 128); line-height: 1.5 !important;">2.8</span>/bin:$PATH
然后运行如下命令:
ldconfig
source /etc/profile
ldconfig命令的作用是让动态链接库为系统所共享,source命令的作用简单来说就是使得配置文件的修改立即生效而不需要重启。
3、下载并安装codeblocks
地址:https://sourceforge.net/projects/codeblocks.berlios/files/codeblocks_12.11-1.tar.gz/download?use_mirror=jaist
解压,然后执行:./bootstrap
bootstrap命令的作用是设置configure脚本及其依赖关系,这个命令只需要执行一次,运行这个命令如果出现下面的错误:
./bootstrap: libtoolize: not found
说明机子上没有安装“libtool”,yum安装下即可:
yum install libtool
可能还会报错:
configure.in:79: warning: macro `AM_OPTIONS_WXCONFIG' not found in library
configure.in:80: warning: macro `AM_PATH_WXCONFIG' not found in library
configure.in:79: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:80: error: possibly undefined macro: AM_PATH_WXCONFIG
将wxGTK-2.8.12下的wxwin.m4复制到/usr/share/aclocal
cp ../wxwin.m4 /usr/share/aclocal
configure
./configure --with-wx-config=/opt/wx/2.8/bin/wx-config
然后 make make install
设置LD_LIBRARY_PATH变量:
export LD_LIBRARY_PATH =/opt/wx/2.8/lib/
这种方式是临时的设置环境变量,关闭shell就会失效,需要永久的设置环境变量参看这里这里,修改/etc/profile文件,加入下面这行:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/wx/2.8/lib"
source /etc/profile
LD_LIBRARY_PATH这个环境变量的作用是让其他程序找到第三方的动态连接库。设置后就没可以通过命令行启动C::B了。
4、如果发现codeblocks无法启动命令行窗口,提示:terminated with status 255,则需要安装xterm。命令:yum install -y xterm
5、在使用多线程时,如果提示"undefined reference to pthread_create()"等之类的错误,则需要手动将pthread链接库加入到项目中:右键项目-》build选项-》链接器设置-》添加路径“/usr/lib/libpthread.so”。
CentOS6.3 下安装codeblocks的更多相关文章
- 【转载】CentOS6.5_X64下安装配置MongoDB数据库
[转载]CentOS6.5_X64下安装配置MongoDB数据库 2014-05-16 10:07:09| 分类: 默认分类|举报|字号 订阅 下载LOFTER客户端 本文转载自zhm&l ...
- CentOS6.5下安装apache2.2和PHP 5.5.28
CentOS6.5下安装apache2.2 1. 准备程序 :httpd-2.2.27.tar.gz 下载地址:http://httpd.apache.org/download.cgi#apache2 ...
- CentOS6.5下安装配置MySQL
CentOS6.5下安装配置MySQL,配置方法如下: 安装mysql数据库:# yum install -y mysql-server mysql mysql-deve 查看mysql-server ...
- CentOS5.4下安装codeblocks 12.11
centos6.3下安装codeblock简单多了,这些开源的软件也都在不断进步.原来装过codeblocks10.05,忘了,这次安装又花了我半天时间,最后总算搞定. 先是安装了wxGTK-2.8. ...
- Fedora 17 下安装codeblocks
Fedora 17 下安装codeblocks: 1.直接从yum源安装: sudo yum install codeblocks 2.源码安装 ...
- CentOS6.5下安装Apache2.4+PHP7
CentOS6.5下安装Apache2.4+PHP7 http://blog.csdn.net/along602/article/details/42695779 http://www.th7.cn/ ...
- 在CentOS6.8下安装Docker
在CentOS6.8下安装Docker 一.查看系统版本 [root@localhost opt]# uname -a Linux localhost.localdomain -.el6.x86_64 ...
- coreseek/sphinx CentOS6.4下安装
一.在CentOS6.4下安装coreseek之前需要预先安装以下软件 1.打开终端 输入 su 获取管理员权限 2.输入命令 yum install make gcc g++ gcc-c++ lib ...
- 建站笔记1:centos6.5下安装mysql
近期买了个域名,想要玩玩自己建站点:接下来遇到的问题都会一次记录下来.以备自己以后复习查看: 首先建站方案选择: wordPress +centos6.5 +mysql; server买的:搬瓦工最低 ...
随机推荐
- MySQL授权命令grant的使用方法
本文实例,运行于 MySQL 5.0 及以上版本. MySQL 赋予用户权限命令的简单格式可概括为: grant 权限 on 数据库对象 to 用户 一.grant 普通数据用户,查询.插入.更新.删 ...
- 推荐几个Dynamic Crm的大神博客
ghostbear的博客:http://blog.csdn.net/ghostbear/article/category/1072859 ghostbear大神的博客是新手学习Dynamics Crm ...
- 数列[专杀Splay版]
时间限制: 3 Sec 内存限制: 128 MB提交: 49 解决: 7 题目描述 输入一个数列,你需要进行如下操作: 1. 把编号为I的数值改为K 2. 输出从小到大排序后第k个数 输入 输 ...
- jenkins管理员密码登录不了
1.密码管理员密码,如何修改 进入/var/jenkins_home/users/admin目录下修改config.xml文件: 以下密码是admin <hudson.security.Huds ...
- [leetcode-526-Beautiful Arrangement]
Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is const ...
- 【Android Developers Training】 29. 从Activity获得结果
注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...
- Oracle的用户、角色以及权限相关操作
1.创建用户create user KD identified by 123456;2.授予连接数据库的权限grant connect to KD;3.将Scott用户的emp表授权给KD可以查询gr ...
- webpack以及loader 加载命令
module.exports={ entry:'./main/main.js', output:{ path:'./build', filename:'bundle.js' }, module:{ l ...
- ES语法注意事项
在函数内部定义全局变量:举个栗子 function fn(){ var str = "hezhi"; } -alert(str) //=>fn不执行的 =>str is ...
- 还原数据库“XXX”时失败。System.Data.SqlClient.SqlError: 无法执行 BACKUP LOG,因为当前没有数据库备份。
标题: Microsoft SQL Server Management Studio------------------------------ 还原数据库“GoldBellXZDepot”时失败. ...