简体   繁体   English

如何在Eclipse CDT中配置特定的GCC交叉工具链?

[英]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": 我已将一些源代码作为C++ Makefile Project导入Eclipse CDT工作区,并为“Indexer Settings”指定了Cross GCC工具链:

在此输入图像描述

The project import went fine, but the include path settings just point to my current native host GCC implementation: 项目导入很顺利,但是包含路径设置只是指向我当前的本机主机GCC实现:

在此输入图像描述

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: 我一直在查看Toolchain Editor属性对话框,但找不到任何方法来配置我在我的开发机器上构建和安装的特定交叉工具链:

在此输入图像描述

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? 如何配置Eclipse CDT以使用我的自制GCC交叉工具链正确地提供索引器,并使用我的特定GCC交叉工具链提供的标准包含路径?

" 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? " 如何配置Eclipse CDT以使用我的自制GCC交叉工具链正确提供索引器,并使用此GCC交叉工具链提供的标准包含路径?

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: 要使这些属性设置可用,请首先转到项目属性对话框中的C++ Build/Builder Settings选项卡:

在此输入图像描述

and check the Generate Makefiles automatically option. 并选中“ Generate Makefiles automatically选项。 Don't click the Apply or OK button now! 不要立即单击“ 应用”或“ 确定”按钮!
But proceed to the C++ Build->Settings sub page 但是进入C++ Build->Settings子页面

在此输入图像描述

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. 在保存项目属性之前,返回“ C++ Build/Builder Settings选项卡并Generate Makefiles automatically取消选中“ Generate Makefiles automatically (以防止在自动启动的构建时出现意外行为)选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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