ubuntu eclipse c/c++ cdt

本文介绍如何在 Linux 系统上安装 Eclipse 及其 C/C++ 开发工具 (CDT) 插件,并提供详细的配置指南以优化开发体验。包括设置外观、代码风格、智能提示等功能,同时介绍了如何禁用自动构建并启用自动保存。

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

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的框框下复制下面的地址: http://download.eclipse.org/releases/galileo; 等待pending...,选择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官方出品,主页位于http://www.eclipse.org/subversive/
或者通过Help->Install New Software...,在work with框框复制地址:http://download.eclipse.org/technology/subversive/0.7/update- site/,选择Subversion项安装

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值