如何在 Mac OS X 10.8/Xcode 4.4 上使用/安装 gcc [英] How to use/install gcc on Mac OS X 10.8 / Xcode 4.4

查看:36
本文介绍了如何在 Mac OS X 10.8/Xcode 4.4 上使用/安装 gcc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 Mountain Lion (Mac OS X 10.8),现在 gcc 似乎不再可用.我还安装了 Xcode 4.4,所以没有更多的/Developer 目录.

I have install Mountain Lion (Mac OS X 10.8) and now gcc doesn't seem to be available anymore. I've also installed Xcode 4.4 so there is no more /Developer directory.

对于 mac 端口和 ruby​​ gem(具有本机扩展),我都需要 gcc.

I need gcc both for mac ports and for ruby gems (that have native extensions).

Xcode 4.4 是否包含 gcc 或者是否有安装 gcc 的方法?

Does Xcode 4.4 include gcc or is there a way to install gcc?

推荐答案

更新:

您现在可以从终端运行以下命令:

You can now just run the following command from your terminal:

xcode-select --install

<小时>

从 Xcode 4.3 开始 - 您现在必须从 Xcode 菜单 > 手动安装命令行工具首选项 >下载.

或者,也有独立安装包 适用于 Mountain Lion (10.8)适用于小牛队 (10.9).

Alternatively, there are stand-alone installation packages both for Mountain Lion (10.8) and for Mavericks (10.9).

这个包通过安装终端来启用 UNIX 风格的开发命令行开发工具,以及 Mac OS X SDK 框架和标题.包含许多有用的工具,例如 Apple LLVM编译器、链接器和 Make. 如果您使用 Xcode,这些工具也是嵌入在 Xcode IDE 中,并且可以安装在您的系统上使用 Xcode 4.3 及更高版本中的下载首选项窗格.这个软件包需要 Mac OS X 10.7.3 或更高版本.

This package enables UNIX-style development via Terminal by installing command line developer tools, as well as Mac OS X SDK frameworks and headers. Many useful tools are included, such as the Apple LLVM compiler, linker, and Make. If you use Xcode, these tools are also embedded within the Xcode IDE, and can be installed on your system using the Downloads preferences pane within Xcode 4.3 and later. This package requires Mac OS X 10.7.3 or later.

这篇关于如何在 Mac OS X 10.8/Xcode 4.4 上使用/安装 gcc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆