Eclipse - 如何在 Eclipse 中使用 Mac OS X (Xcode) 工具链?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11713947/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 01:04:07  来源:igfitidea点击:

Eclipse - how to use Mac OS X (Xcode) toolchain in Eclipse?

xcodeeclipsegcctoolchain

提问by ipatch

I installed Eclipse (Eclipse IDE for C/C++ Developers Version: Juno Release Build id: 20120614-1722) today. And I wanted to use the Mac OS X toolchain that is provided with Xcode. I am running OS X (10.7.4) Xcode 4.3.2, and I checked, and I do have Command Line Toolsinstalled. When I go to Eclipse -> Preferences -> New CDT Project Wizard -> Toolchains: all I see is GNU Autotools ToolchainI don't see the "Mac OS X GCC toolchain". How do I get the Mac OS X GCC toolchain to appear in the toolchain selection in Eclipse? enter image description here

我今天安装了 Eclipse(C/C++ 开发人员的 Eclipse IDE 版本:Juno Release Build id:20120614-1722)。我想使用 Xcode 提供的 Mac OS X 工具链。我正在运行 OS X (10.7.4) Xcode 4.3.2,我检查过,我确实Command Line Tools安装了。当我转到 Eclipse -> 首选项 -> 新建 CDT 项目向导 -> 工具链时:我看到的只是GNU Autotools Toolchain我没有看到“Mac OS X GCC 工具链”。如何让 Mac OS X GCC 工具链出现在 Eclipse 的工具链选择中? 在此处输入图片说明

回答by yapper

I have found that I sometimes have to uncheck that checkbox at the bottom "Show Project types and toolchains only if they are supported on the platform" Then when I open the Executable folder I can select the MacOs X GCC toolchain.

我发现有时我必须取消选中底部的复选框“仅当平台支持时才显示项目类型和工具链”然后当我打开 Executable 文件夹时,我可以选择 MacOs X GCC 工具链。

回答by kurupt_89

Instead of selecting the GNU Autotools Folder like in your picture above, Select the executable folder and the options for cross gcc and Macosx gcc toolchains should be there.

不是像上图那样选择 GNU Autotools 文件夹,而是选择可执行文件夹,并且应该有跨 gcc 和 Macosx gcc 工具链的选项。