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

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

问题描述

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



我需要gcc用于mac端口和ruby gems(具有本机扩展)。



Xcode 4.4包含gcc还是有办法安装gcc?



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

  xcode-select --install 






从Xcode 4.3开始 - 您现在必须手动安装来自 Xcode menu>的命令行工具。首选项>下载





另外,还有独立的安装软件包 for Mountain Lion(10.8) for Mavericks(10.9)


这个包通过安装
命令行开发者工具,以及Mac OS X SDK框架和
头文件,可以通过终端进行UNIX风格的开发。 包括许多有用的工具,如Apple LLVM
编译器,链接器和Make。
如果使用Xcode,这些工具也嵌入Xcode IDE中的
,并且可以请使用Xcode 4.3及更高版本中的下载偏好设置窗格安装在您的系统
上。此
包需要Mac OS X 10.7.3或更高版本。



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.

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

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

解决方案

Update:

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

xcode-select --install


Starting with Xcode 4.3 - you must now manually install command line tools from Xcode menu > Preferences > Downloads.

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

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天全站免登陆