为什么我不能在OS X上检查我的GCC编译器版本 [英] Why can't I check my version of GCC compiler on OS X

查看:103
本文介绍了为什么我不能在OS X上检查我的GCC编译器版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在终端上输入了

llvm-gcc --version

但是我有这个:

Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix`

我无法解释该语句块吗?还是忘记了在系统上启用某些功能?

Am I not able to interpret this block of statements? or did I forget to enable something on my system?

推荐答案

没有错.情况有点令人困惑.

Nothing is wrong. The situation is just a little confusing.

Apple不再使用Xcode分发GCC.现在,他们在Mac OS X上使用 Clang 作为默认(唯一!)编译器.ccclang(以及C ++变体c++g++clang++)现在都链接在一起,可以在当前版本的Xcode下运行clang.

Apple no longer distributes GCC with Xcode. They now use Clang as the default (and only!) compiler on Mac OS X. cc, gcc, and clang (as well as the C++ variants, c++, g++, and clang++) are now all linked to run clang under current versions of Xcode.

根据--version输出,您正在运行的clang版本为500.2.79.

The version of clang you're running is, per the --version output, 500.2.79.

如果要安装GCC作为clang的替代方法,则可以使用多种方法来进行安装,包括使用Homebrew的一种方法:

If you want to install GCC as an alternative to clang, you can do so using a variety of methods, including one using Homebrew:

https://github.com/mxcl/homebrew/Wiki/自定义GCC和交叉编译器

这篇关于为什么我不能在OS X上检查我的GCC编译器版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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