Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure a particular GCC cross toolchain in Eclipse CDT?

I have imported some source code as C++ Makefile Project to an Eclipse CDT workspace, and specified the Cross GCC toolchain for "Indexer Settings":

enter image description here

The project import went fine, but the include path settings just point to my current native host GCC implementation:

enter image description here

I've been looking in the Toolchain Editor properties dialog, but couldn't find any way to configure a particular cross-toolchain I've been building and installing on my development machine:

enter image description here

The opened dialog only allows to select the toolchain particles, but not to configure, where these should be actually located:

enter image description here


How can I configure Eclipse CDT to use my homebrew GCC cross-toolchain to feed the Indexer correctly, and use the standard include paths supplied by my particular GCC cross-toolchain?

like image 883
πάντα ῥεῖ Avatar asked Nov 28 '14 01:11

πάντα ῥεῖ


People also ask

How do I select toolchain in Eclipse?

Open Project Properties and go to the Tool Chain Editor under the C/C++ Build section. Select Cross GCC in the Current Toolchain selection box. Select the Settings section right above Tool Chain Editor under C/C++ Build. On the Tool Settings tab, select the Cross Settings item at the very top.

What is cross GCC command in Eclipse?

In Cross GCC Command, specify the Cross compiler prefix as mingw32- and the Cross compiler path as C:\MingGW\bin. The prefix is obtained from the mingw32-g++ .exe file and the mingw32-gcc .exe file for in the C:\MingGW\bin directory. Click on Finish.


1 Answers

"How can I configure Eclipse CDT to use my homebrew GCC cross-toolchain to feed the Indexer correctly, and use the standard include paths supplied from this GCC cross-toolchain? "

Unfortunately it's not obvious or intuitive, how to set the properties for a particular (cross-)toolchain, that should be bound to a project.

To make these property settings available, first go to the C++ Build/Builder Settings Tab in the project properties dialog:

enter image description here

and check the Generate Makefiles automatically option. Don't click the Apply or OK button now!
But proceed to the C++ Build->Settings sub page

enter image description here

and fill in the cross-toolchain prefix, and path where the binaries are actually located.

Go back to the C++ Build/Builder Settings Tab and uncheck the Generate Makefiles automatically (to prevent unexpected behavior on automatically started builds) option, before saving the project properties.

like image 159
πάντα ῥεῖ Avatar answered Sep 24 '22 02:09

πάντα ῥεῖ