CrossCompileInEclipse

From eLinux.org
Revision as of 12:01, 27 October 2011 by Adushistova (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Preparation

This setup is based on Eclipse 3.6, installation process for 3.7 is supposed to be easier.

Start with Eclipse IDE for C/C++ Linux Developers package (http://www.eclipse.org/downloads/packages/eclipse-ide-cc-linux-developers-includes-incubating-components/heliossr1).

Install missing Target Management features.

Download http://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/helios/dist/cdt-master-7.0.1-I201009241320.zip.

Install cross compiler support.

Creating and building a new project

Start Eclipse, switch to the "C/C++" perspective.

Go to "New->C/C++ Project".

On the first page, enter your project name.

Select "Executable-> Cross-Compile Project" on the left tab and "Cross GCC" on the right, click "Next".

On the "Command" wizard page enter your compiler prefix and an absolute path to the directory where your cross tools live, click "Finish".

Now, your project will be built with the use of your cross tools.