I have imported some source code as C++ Makefile Project
to an Eclipse CDT workspace, and specified the Cross GCC
toolchain for "Indexer Settings":
The project import went fine, but the include path settings just point to my current native host GCC implementation:
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:
The opened dialog only allows to select the toolchain particles, but not to configure, where these should be actually located:
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?
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.
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.
"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:
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With