1, 使用系统默认安转的 eclipse 与 cdt, 然后 新建 c++ 工程; eclipse crash,
找了很多方法, 无解,
最后测试 了一下, 方法二的对这个也有效!!!!!!!!!!!!!!!!
2, 自己下载最新的eclipse 4.4, 新建c++工程, eclipse crash
http://stackoverflow.com/questions/26436009/eclipse-luna-crashes-on-new-project-in-ubuntu
Another workaround mentioned there is for Oxygen, edit the normally already existing file/usr/share/themes/oxygen-gtk/gtk-2.0/gtkrc and
change
`GtkComboBox::appears-as-list = 1`into
`GtkComboBox::appears-as-list = 0`
This workaround is working for me.
3, c++ 配置:
http://blog.chinaunix.net/uid-26729093-id-4123431.html
更改 table to spaces --->>>>>
右键选中 project ->>properties -->>> c++ general --->>> Formatter -->>new leo_format -->>
一、C/C++环境配置:Window - Preferences - C/C++
1、Appearance,选中Group method definitions in the Outline view
2、 Code Style,通过New来新建一个代码风格,命名为qpsoft,且初始化为BSD/Allmain,然后按习惯修改一些细节。我建议是采用默认的,或许是我过去编Java编写习惯的原因。可按自己的意愿来。
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/
注意,新建文件的时候,如果是新建的一个新工程,那么你要为你新建的工程加上后缀名。
在编译运行的时候,要一定要先ctr+b编译,然后链接运行,要不然的话会出现,lanch faild,binary not found !
另外需要注意的是我们在编译C++的时候要注意配置编译器的路径和C++运行库的路径,具体方法是打开windows->preference->C/C++->Environment
C_INCLUDE_PATH=/usr/include
C_PLUS_INCLUDE_PATH=/usr/include/c++/4.6.3
其中,/usr/include/c++/4.6.3为gcc编译器的所在路径。
在命令行中输入gcc --version 查看版本。

本文详细介绍了使用Eclipse和CDT解决C++工程崩溃的方法,并提供了针对C++环境的优化配置步骤,包括智能提示速度提升、代码风格设置、快捷键修改等,以提高开发效率。
3034

被折叠的 条评论
为什么被折叠?



