Centos 7—安装Code::Blocks—Codeblocks—codeblocks


http://baike.baidu.com/link?url=ukDEDHZLDCTojB4CAe5MgqOUDqIeoEk51PWofZQy5TIGGjstJzDQg8nbI8x9akdnCpOXT0o5HlsKGy5LfkZxTK

Code::Blocks 是一个开放源码的全功能的跨平台C/C++集成开发环境。 Code::Blocks是开放源码软件。Code::Blocks由纯粹的C++语言开发完成,它使用了著名的图形界面库wxWidgets(2.6.2 unicode)版。对于追求完美的C++程序员,再也不必忍受Eclipse的缓慢,再也不必忍受VS.NET的庞大和高昂的价格。
++++++++++++++++++++++++++++++
http://www.centoscn.com/image-text/install/2014/0905/3684.html

 在CentOS7上安装Codeblocks的过程。

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

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

3. 安装wxGTK(或者wxwidgets),下载地址:http://www.wxwidgets.org/downloads/,下载的文件为:wxWidgets-3.0.2.tar.bz2,

解压之后,进入目录后执行命令

./configure --enable-xrc --enable-monolithic --enable-unicode
make -j5
make install
 ------------------------------------------------------
 
 The installation of wxWidgets is finished.  On certain
 platforms (e.g. Linux) you'll now have to run ldconfig
 if you installed a shared library and also modify the
 LD_LIBRARY_PATH (or equivalent) environment variable.
 
 wxWidgets comes with no guarantees and doesn't claim
 to be suitable for any purpose.
 
 Read the wxWindows Licence on licencing conditions.
 
 ------------------------------------------------------

ldconfig


4. 安装codeblocks,下载codeblocks安装包,下载地址:http://www.codeblocks.org/downloads/

这里有两种方式进行安装:

第一种方式是直接下载rpm包,可以直接进行安装,但是rpm安装形式,没有默认安装可视设计wxsmith。

第二种方式是下载源代码包,后缀为.tar.gz(.tar.bz2),下载之后,解压缩,进入目录,执行命令

./configure --prefix=/codeblocks --with-contrib-plugins=all
(如果只是./configure那默认情况是不会安装可视设计wssmith,如果不需要图形界面开发的话可以直接使用第一种安装方式)
-------------------------------------------------------------------------------
checking for GTK2... yes
checking for GAMIN... no
configure: error: Package requirements (gamin) were not met:

No package 'gamin' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GAMIN_CFLAGS
and GAMIN_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
-------------------------------------------------------------------------------
解决上面问题的方法: yum install gamin*

make -j5
make install

5.安装好codeblocks后,在application下会出现programming菜单项,在这里可以启动codeblocks.

有时候也会出现无法启动的情况,需要这样做:

vim /etc/ld.so.conf
最后一行添加:/usr/local/lib
保存退出,然后运行/sbin/ldconfig
即可。

6.安装一下xterm:yum install xterm

7.如果没有看到codeblocks菜单项,可以:创建桌面启动器如下:

 
1、点击应用程序--系统工具
2、选择“启动应用程序”
3、在启动用程序首选项中选择“添加”
4、会出现和以前一样的添加启动程序对话框,进行设置
5、设置完名称和命令(路径)后,点击“添加”,启动器就被添加到列表里了
6、用鼠标选中刚添加的启动器,将其拖到桌面
7、右击新建的起动器,选择属性,在权限选项卡中勾选——执行:允许以程序执行文件
8、同上步,在基本选项卡中点击图标,可以设置启动器的桌面图标。





<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(157) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
原文地址:https://www.cnblogs.com/ztguang/p/12648724.html