平臺(tái)搭建環(huán)境:Ubuntu 10.04,最新的Ubuntu 10.10相信也一樣。
1 安裝eclipse:
第一種是通過(guò)Ubuntu自帶的程序安裝功能安裝Eclipse,應(yīng)用程序 ->Ubtuntu軟件中心,搜Eclipse安裝即可。
第二種方法是用命令:應(yīng)用程序->附件->終端 然后輸入(中間可能需要你輸入密碼):
|  | 
sudo apt-get install eclipse
sudo apt-get install eclipse-pde
sudo apt-get install eclipse-jdt
2 安裝中文語(yǔ)言包
菜單欄:Help------>Install New Software------>在Work with的框框下輸入以下地址回車。
http://download./technology/babel/update-site/galileo
選擇簡(jiǎn)體中文: Babel Language Packs in Chinese (Simplified)
然后就是選擇簡(jiǎn)體中文安圖提示一步步安裝
3 安裝CDT(c/c++插件)
(1)同 2 中 在Work with的框框下輸入 http://download./releases/galileo
選擇Collaboration->Mylyn Bridge: C/C++ Development,安裝,重啟eclipse
(2)同上輸入網(wǎng)址后選擇 Programming Languages->Eclipse C/C++ Development
切記:(1)(2)順序有依賴關(guān)系,安裝順序不能顛倒。
在安裝cdt的時(shí)候,會(huì)報(bào)這個(gè)錯(cuò)誤: 
An error occurred while installing the items 
 
session context was:(profile=PlatformProfile,
phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Install,
operand=null --> [R]org.eclipse.cvs 1.0.400.v201002111343,
action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
  The artifact file for osgi.bundle,org.eclipse.cvs,1.0.400.v201002111343 was not found. 
后來(lái)google了一下,發(fā)現(xiàn)解決辦法。 
sudo apt-get install eclipse-pde 
在裝cdt插件,完成~ 
用Eclipse+CDT開(kāi)發(fā)c/c++項(xiàng)目的時(shí)候,怎么能讓Eclipse發(fā)揮代碼自動(dòng)提示的功能呢?其實(shí)也很簡(jiǎn)單: 【LINUX公社 www.LinuxIDC.com 】
打開(kāi)終端:輸入:$ gcc- v
得到類似的:gcc 版本 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
很容易就看到你當(dāng)前使用的版本了。
啟動(dòng)Eclipse.進(jìn)入:Windows-->Preferences-->C/C++找到Environment。增加兩個(gè)變量:
CPLUS_INCLUDE_PATH: /usr/include/c++/4.1.3(我的gcc版本)
C_INCLUDE_PATH: /usr/include
接下來(lái)新建一個(gè)c project.編寫(xiě)代碼的時(shí)候,當(dāng)敲入'.'的時(shí)候就會(huì)自動(dòng)彈出可備用的代碼。

 
                         
                                
 
                                




 
                        

