Chinaunix首页 | 论坛 | 博客
  • 博客访问: 479230
  • 博文数量: 120
  • 博客积分: 1853
  • 博客等级: 上尉
  • 技术积分: 1177
  • 用 户 组: 普通用户
  • 注册时间: 2011-10-22 22:40
文章分类

全部博文(120)

文章存档

2013年(16)

2012年(104)

分类: LINUX

2012-05-01 20:40:25

Ubuntu 下使用eclipse开发C/C++应用程序
2010-07-14 20:10
1、安装eclipse
首先在终端输入:
sudo apt-get install eclipse
sudo apt-get install eclipse-pde
sudo apt-get install eclipse-jdt

2、再安装CDT插件
启动eclipse; 选择Help->Install New Software...,在Work with的框框下复制下面的地址: 选择Collaboration->Mylyn Bridge: C/C++ Development,安装,重启eclipse; 同上述操作,选择Programming Languages->Eclipse C/C++ Development,重启eclipse就可以开发C/C++应用程序了

3、优化eclipse+CDT

C/C++环境配置:Window - Preferences - C/C++
1、Appearance,选中Group method definitions in the Outline view
2、 Code Style,选择BSD/Allmain
3、Editor - Content Assist - Auto-Activation - Delay(ms),原值为500,改为100,则智能提示速度将非常快
4、Indexer,清空Files to index up-front的内容,修改Cache limits的值,尽可能大,可以提高速度

修改智能提示快捷键:
Window - Preferences - General - Keys,输入Content,找到Content Assist,在Binding中修改为Shift+Space

其他设置
1. Window - Preferences - General - Editors - Text Editors,选中Show line numbers,设置Print margin column为110
2. Window - Preferences - General - Workspace,取消Build automatically,选中Save automatically before build

通过插件扩展功能
1. 支持Subversion:Eclipse官方出品,主页位于
或者通过Help->Install New Software...,在work with框框复制地址:,选择Subversion项安装



                                   --------------------------http://hi.baidu.com/hello_will/blog/item/2d1ae3377b820c86a61e12c8.html


一下是自己从网上看的一些补充,需要设置一下环境变量:
在window-->preference-->c/c++-->environment-->add
Name: C_INCLUDE_PATH(这个设置的是c的头文件) 
Value: /usr/include:/usr/include/i386-linux-gnu:/usr/lib/gcc/i686-linux-gnu/4.6/include:/usr/lib/gcc/i686-linux-gnu/4.6/include-fixed:/usr/local/include
和 
Name: CPLUS_INCLUDE_PATH (这个设置的是c++的头文件)
Value: /usr/include/c++/4.6.3(最后的是gcc的版本,可以通过gcc -v命令获得)
阅读(4077) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~