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

无人久伴 提交于 2020-07-05 09:44:23

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/27180771/how-to-configure-a-particular-gcc-cross-toolchain-in-eclipse-cdt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!