Creating a C/C++ project

It is now time to create your first C or C++ project. A C++ project is used as an example. First, start the project wizard with menu File -> New -> C++ project. There choose "Hello Word C++ Project".

Eclipse - Create C++ projectEclipse - Create C++ project

You can now either finish the wizard and open the project properties under the menu Project -> Properties or click "Next" twice and open the advanced settings. In this dialog, you have to adjust the toolchain used. Each tool in the toolchain has a common prefix which you must now enter in all places, where the tools are mentioned. As an example, the prefix "/usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi" of the Ångström toolchain is used.

First adjust the paths in the "Discovery Options" as shown below. It is used by the indexer to find header files. Change the "Compiler Invocation Command" for both, the "GCC C Compiler" and the "GCC C++ Compiler".

Eclipse - Discovery OptionsEclipse - Discovery Options

Now change the path for each tool in the list shown the following screenshot.

Eclipse - Compiler SettingsEclipse - Compiler Settings

Be aware that you have to repeat theses adjustments for all build configuration. Here it was done for the debug configuration.

After finishing the configuration and building the project, it should look like this:
Eclipse - Created projectEclipse - Created project

As you can see there are also headers listed that do not belong to the ARM toolchain but to the development system. This is a bug in Eclipse CDT and can be worked around by closing Eclipse, deleting the file .metadata/.plugins/org.eclipse.cdt.make.core/ in the workspace directory and restarting Eclipse (adjust the filename if your project was called differently). It now should look like this:
Eclipse - Cleaned projectEclipse - Cleaned project

You have now set up the first project and can add more files and code. The project creation process for C applictions is basically the same. There are just the GCC C++ options missing.