带有 XCode 5 的命令行工具

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18950080/
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 03:53:09  来源:igfitidea点击:

Command Line Tools with XCode 5

xcodemacosgcchomebrew

提问by loganhasson

I just updated to XCode 5, and as homebrew told me my gcc was out of date, I updated it. However, now when I type

我刚刚更新到 XCode 5,正如自制软件告诉我我的 gcc 已经过时,我更新了它。但是,现在当我输入

gcc

into terminal, I get:

进入终端,我得到:

clang: error: no input files

Is that behavior to be expected? I'm used to seeing something along the lines of:

这种行为是预期的吗?我习惯于看到以下内容:

i686-apple-darwin11-llvm-gcc-4.2: no input files

(I'm running OS X 10.8.5, by the way.)

(顺便说一下,我运行的是 OS X 10.8.5。)

Thanks!

谢谢!

回答by ppaulojr

The default compiler for Xcode since Xcode 4 is clang.

自 Xcode 4 起,Xcode 的默认编译器是clang.

Check this answerfor more details.

检查此答案以获取更多详细信息。

回答by null

Xcode 5 command line tools may be downloaded from https://developer.apple.com/downloads/index.action#

Xcode 5 命令行工具可以从https://developer.apple.com/downloads/index.action#下载

"Command Line Tools (OS X Mavericks) For Xcode - Late October"

“适用于 Xcode 的命令行工具 (OS X Mavericks) - 10 月下旬”

There might be a command line way, but I haven't tried it: https://apple.stackexchange.com/questions/88535/how-to-download-the-command-line-tools-for-xcode-without-the-downloads-for-devel

可能有命令行方式,但我还没有尝试过:https: //apple.stackexchange.com/questions/88535/how-to-download-the-command-line-tools-for-xcode-without-下载开发