1. Install Eclipse:
TheProgramInstall eclipse, Application> ubtuntu Software Center, search for eclipse
Install two of them: Eclipse and eclipse-PDDE. (If you do not install it, other plugins cannot be installed successfully, and CDT cannot be installed)
2. Install the CDT (C/C ++ plug-in)
(1) Start eclipse. On the menu bar: Help ------> install new software ------> in the work with box, enter the following address and press Enter.
Http://download.eclipse.org/releases/galileo
If not, select the Add button on the right to add the URL.
Select collaboration-> mylyn Bridge: C/C ++ development, install and restart eclipse
(2) enter the URL above and select programming development ages-> eclipse C/C ++ Development
Remember: (1) (2) the order is dependent and the installation sequence cannot be reversed.
3 install g ++
After completing the first two steps, you can create a C ++/C project, but the following error occurs during program compilation,
Make [1]: G ++: Command not found
Unable to compile because g ++ Is Not Installed
Therefore, you need to install g ++
Run sudo apt-Get install g ++ on the terminal
After that, you can: file-> New-> Project-> C ++ project-> executable-> Hello World C ++ Project
Create a simple project for testing.
3. Install the Chinese Language Pack (optional)
Menu Bar: Help ------> install new software ------> enter the following address in the work with box and press Enter.
Http://download.eclipse.org/technology/babel/update-site/galileo
Select Simplified Chinese: Babel language packs in Chinese (simplified)
Then, select the Simplified Chinese security chart to prompt step-by-step installation.
4. Use eclipse + CDT to develop C/C ++ projects.CodeAuto-Prompt Function
Terminal: Enter $ gcc-V
Get the GCC version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
You can easily see the current version.
Start eclipse. Go to windows --> preferences --> C/C ++ and find environment. Add two changes:
Cplus_include_path:/usr/include/C ++/4.1.3 (My GCC Version)
C_include_path:/usr/include
Next, create a new C Project. When writing code, when you type '.', the code that can be used is automatically displayed.
From:Http://hcleon.javaeye.com/blog/689760