ubuntu下安装codeblocks

转载 2007年10月01日 00:40:00

ubuntu下安装codeblocks


code::blocks在ubuntu下的安装。安装步骤:

1、安装必要组件

代码:

sudo apt-get install build-essential


代码:

sudo apt-get install gdb


2、更新源

代码:

gksudo gedit /etc/apt/sources.list


添加(以feisty为例):

代码:

deb http://apt.tt-solutions.com/ubuntu/ feisty main


3、获取密钥

代码:

wget http://www.tt-solutions.com/vz/key.asc


代码:

sudo apt-key add key.asc


4、安装最新 wxWidgets

代码:

sudo apt-get update


代码:

sudo apt-get install libwxgtk2.8-0 libwxgtk2.8-dev wx2.8-headers wx-common


5、设置 wxWidgets 默认版本

代码:

sudo update-alternatives --config wx-config


从列表中选择一项即可。
6、下载 Code::Blocks 每夜构建版本
下载地址:http://forums.codeblocks.org/index.php/board,20.0.html
7、安装 Code::Blocks

代码:

sudo dpkg -i CB_20070608_rev4078_Ubuntu6.10+7.04_wx2.8.4.deb


其中,CB_20070608_rev4078_Ubuntu6.10+7.04_wx2.8.4.deb是2007年6月8日最新版本,以此类推。

在这里注意的是最后一步,若在安装最后一步时出错,那么将文件解压后一个文件一文件的安装。



参考 http://wiki.codeblocks.org/

Installing Code::Blocks nightly build on Ubuntu

From CodeBlocks



Jump to: navigation, search

This is a quick guide to get Code::Blocks up and running on your Ubuntu based Linux distribution. It is also going to make sure you can develop wxWidgets applications on your box as well. Look at the bottom of this guide for a complete command line that will install all the packages in one operation.

First be sure you have the necessary software to compile and debug programs.

1. Install the compiler.

sudo apt-get install build-essential

2. Install the debugger.

sudo apt-get install gdb

You'll need to install wxWidgets to use Codeblocks. Revisions prior to revision 4051 use wxWidgets 2.6 and revisions from 4051 and after use wxWidgets 2.8.4. If you want to install a revision prior to revision 4051, make sure you have your universe and multiverse repositories enabled and install the following packages.

3. Install wxWidgets library. (This package is all that is needed to run any application that uses wxWidgets. ie. Code::Blocks)

sudo apt-get install libwxgtk2.6-0

4. Install the wxWidgets developement packages. (This is used to develop wxWidgets applications of your own.)

sudo apt-get install libwxgtk2.6-dev wx2.6-headers wx-common

5. (OPTIONAL) Install the wxWidgets documentation.

sudo apt-get install wx2.6-doc


To install wxWidgets 2.8.4 you need to be using Ubuntu 6.10 (Edgy Eft) or Ubuntu 7.04 (Feisty Fawn) and you need to add the wxWidget repository to your sources.list. You can install wxWidgets 2.8.4 on Ubuntu 6.06 (Dapper Drake), but the nightly builds are not made to run on Dapper.

1. Backup your current sources.list first for precaution.

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2. Open your sources.list in a text editor to edit it.

gksudo gedit /etc/apt/sources.list

3. Add the correct repository for the Ubuntu version you are running to the end of the file. The repository listed below is referenced on the wxWidgets.org download page and appears to be for the stable version.

deb http://apt.tt-solutions.com/ubuntu/ edgy main

or

deb http://apt.tt-solutions.com/ubuntu/ feisty main

4. Save and close the file.

5. Add the key for tt-solutions.com.

wget http://www.tt-solutions.com/vz/key.asc sudo apt-key add key.asc

Alternate wxWidgets repository. Some users of Code::Blocks have received critical errors related to libwxgtk when using the above repository packages. They were able to solve their problems by installing newer packages available from an alternate repository from wxWidgets.org. To use these packages make the following changes to the above directions:

Add deb http://apt.wxwidgets.org/ edgy-wx main or deb http://apt.wxwidgets.org/ feisty-wx main to your sources.list.

Download the gpg key using wget http://apt.wxwidgets.org/key.asc and install the same as above.

6. Update your sources.list and run upgrade to make sure everything is up-to-date.

sudo apt-get update
sudo apt-get dist-upgrade

7. Now you're finally ready to install wxWidgets 2.8.4.

sudo apt-get install libwxgtk2.8-0 libwxgtk2.8-dev wx2.8-headers wx-common

8. Set wxWidgets 2.8 as default version for your machine. Select number for the wxgtk2.8 version.

sudo update-alternatives --config wx-config

Now go get the nightly build and install it. All dependencies should now be met.

1. Get the latest nigtly build of Code::Blocks from the nightly builds forum.

2. Install Code::Blocks.

sudo dpkg -i <Name_Of_Daily_Build.deb>

NOTE: Since revision 4281 and after, the nightly builds are made differently. Codeblocks is now packaged into separate Debian packages and the packages are archived together in a tar.gz file.

1. Download the tar.gz file to your computer and extract the files to an empty directory, such as one called temp for example.

tar xvf CB_date-of-build_revision-number_Ubuntu6.10+7.04_wx2.8.4.tar.gz

2. Install all the packages at the same time.

sudo dpkg -i *.deb

The packages can be installed individually, if you prefer not to install everything. The first package to install is libcodeblocks0 followed by the codeblocks package. All the other packages are optional. If you want to install the wxsmith and/or contrib packages, you must install the libwxsmithlib0 package first.





NOTE: Here is a complete command line for the above steps. Watch for word wrap. Replace wx2.6 with wx2.8 when needed.

sudo apt-get install build-essential gdb libwxgtk2.6-0 libwxgtk2.6-dev wx2.6-headers wx2.6-doc wx-common


Without optional steps:

sudo apt-get install build-essential gdb libwxgtk2.6-0 libwxgtk2.6-dev wx2.6-headers wx-common



 

Ubuntu下安装CodeBlocks的正确姿势

如何在Ubuntu系统下正确安装CodeBlocks软件。网上的那些教程99%都是误人子弟!!!...
  • xinyunyishui
  • xinyunyishui
  • 2016年03月23日 22:32
  • 19963

ubuntu下code blocks安装全过程

ubuntu下code blocks安装全过程&&codeblocks快捷键&&解决调试终端不能粘贴问题   (一)安装步骤:   1.先把编译环境,C库、C++库和Boost...
  • lv414333532
  • lv414333532
  • 2016年07月26日 07:49
  • 747

ubuntu 下 codeblocks 的使用 各种技巧

ubuntu下code blocks安装全过程&&codeblocks快捷键&&解决调试终端不能粘贴问题   (一)安装步骤:   1.先把编译环境,C库、C++库和Boost库装好,如下: ...
  • i_fuqiang
  • i_fuqiang
  • 2013年07月21日 19:10
  • 11370

ubuntu安装和配置codeblock

在 Ubuntu 操作中安装Code::Blocks 步骤如下: 安装步骤: 1.先把编译环境,C库、C++库和Boost库装好,如下: sudoapt-get install build-es...
  • u012978884
  • u012978884
  • 2014年01月04日 15:27
  • 2275

Ubuntu Code::Blocks 修改用户自定义颜色主题

原文链接:http://www.cnblogs.com/platero/p/3518850.html
  • u012325552
  • u012325552
  • 2014年04月06日 10:51
  • 1454

【Linux】Ubuntu系统中codeblocks主题修改(护vim)

参考操作步骤coderesult 1 参考 点击打开链接http://blog.csdn.net/gzshun/article/details/8294305 点击打开链接http://www....
  • u013346007
  • u013346007
  • 2017年03月23日 23:22
  • 820

Ubuntu下CodeBlocks的安装、配置及静态库动态库的简单使用举例

Ubuntu下CodeBlocks的安装、配置及静态库动态库的简单使用举例
  • fengbingchun
  • fengbingchun
  • 2014年01月08日 15:40
  • 7657

CodeBlocks安装及使用

Code::Blocks是一个开放源码的全功能的跨平台C/C++集成开发环境,由纯碎的C++语言开发完成,使用了著名的图形界面库wxWidgets。由于最近上机指导,学校ACM推荐同学们用的是这款软件...
  • wang1127502020
  • wang1127502020
  • 2015年11月24日 11:20
  • 6731

code::blocks 在linux下的安装 全过程

渣渣要准备acm省赛了,比赛要求环境是linux,所以要临时抱佛脚了,先提前适应一下。 话说真的是安了2个小时啊,当跑出来“hello world”的时候真是想哭啊。。。 其实很多方法都可以安装,重要...
  • woyuhuaijin
  • woyuhuaijin
  • 2016年05月03日 15:55
  • 5082

Linux下源码安装CodeBlocks

Linux下源码安装CodeBlocks                                   qianghaohao(CodingNutter)   一. 安装平台说明: CentOs...
  • qianghaohao
  • qianghaohao
  • 2016年07月16日 15:49
  • 1971
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:ubuntu下安装codeblocks
举报原因:
原因补充:

(最多只允许输入30个字)