简体   繁体   中英

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":

在此输入图像描述

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?

" 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM