Ubuntu13.10下用源码安装Codeblocks

本文详细介绍了如何通过源码包在Ubuntu系统上安装Code::Blocks集成开发环境的过程,包括解决依赖问题、配置编译参数及最终安装步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

使用源码包安装codeblocks

一、登录http://www.codeblocks.org/home进入codeblocks官网

 


点击Download进入下载界面

如图所示选择源码安装

 

 

选择第一个进入下载用进入SourceForge全球最大开源软件开发平台和仓库)下载。

 

 

对源码包进行解压。 


tar -zxvf codeblocks_13.12-1.tar.gz解压到当前文件夹下


cd  codeblocks进入文件夹

 

如图所示:使用Vim  README打开后如图所示


 

打开COMPLIERS后看见如下信息

 

大概是说Linux下安装要依赖GCCGDB,如果没有安装的要记着把GCC安装好

使用./configure检测依赖问题,如图所示提示错误wx-config没安装

 

安装上wxwindows

zsheng@ubuntu:~/codeblocks-13.12$ wx-config

The program 'wx-config' can be found in the following packages:

 * libwxbase2.8-dbg

 * libwxbase2.8-dev

 * libwxgtk2.8-dbg

 * libwxgtk2.8-dev

Try: sudo apt-get install <selected package>

 

按照它要求的做

zsheng@ubuntu:~/codeblocks-13.12$ sudo apt-get install libwxbase2.8-dbg \

> libwxbase2.8-dev libwxgtk2.8-dbg libwxgtk2.8-dev

Reading package lists... Done

Building dependency tree       

Reading state information... Done

The following extra packages will be installed:

  libwxbase2.8-0 libwxgtk2.8-0 wx-common wx2.8-headers

Suggested packages:

  wx2.8-doc libgl1-mesa-dev libgl-dev xlibmesa-glu-dev libglu-dev

The following NEW packages will be installed:

  libwxbase2.8-0 libwxbase2.8-dbg libwxbase2.8-dev libwxgtk2.8-0

  libwxgtk2.8-dbg libwxgtk2.8-dev wx-common wx2.8-headers

0 upgraded, 8 newly installed, 0 to remove and 316 not upgraded.

Need to get 50.1 MB of archives.

After this operation, 129 MB of additional disk space will be used.

Do you want to continue [Y/n]?

我们点击回车以继续下载安装

在下载完成后一些安装程序安装完成后,我们继续

 

在此运行./configure提示还有没安装

No package 'gtk+-2.0' 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 GTK2_CFLAGS

and GTK2_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

zsheng@ubuntu:~/codeblocks-13.12$ 

继续安装这个sudo  apt-get install  gtk+-2.0之后又是漫长下载安装和等待。

一段时间的等待之后,终于是安装好了,接下来继续检测依赖问题

 

*************************************************

* Code::Blocks source tree has been configured. *

*************************************************

 

You can now build Code::Blocks by issuing 'make'.

When the build is complete, become root and install

it by issuing 'make install'.

 

这下终于搞定依赖问题了。

./configure  --prefix=/usr/local/codeblocks

将之安装在/usr/local/codeblocks之下

接下来sudo make && make install

接下来就是编译和安装了又是漫长的等待

 

没有提示错误,这下安装好了。

进去开启试试:

zsheng@ubuntu:/usr/local/codeblocks/bin$ ./codeblocks

如下安装好了,哈哈,就此完成。


 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值