我怎么能明白我的标准库,并在我的电脑上编译什么标准GCC? [英] How can I understand what standard my libraries are and to what standard gcc compiles in my computer?

查看:112
本文介绍了我怎么能明白我的标准库,并在我的电脑上编译什么标准GCC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是从我的终端:

  Korays酒店-的MacBook-Pro的:〜koraytugay $ GCC --version
配置有: - preFIX = /库/开发商/ CommandLineTools的/ usr --with-GXX-包括-DIR = / usr / include目录/ C ++ / 4.2.1
(基于LLVM 3.6.0svn)苹果LLVM版本6.1.0(铛-602.0.49)
目标:x86_64的 - 苹果darwin14.3.0
线程模型:POSIX

有3 C类标准,据我所知,ANSI C,C99和C11。

我怎么能知道我有一个图书馆,什么我编译器支持?


解决方案

您必须找到你的编译器和/或操作系统的文档,它并不总是明确记载。



  

苹果LLVM版本6.1.0(基于LLVM 3.6.0svn)(铛-602.0.49)


这对应于X code 6.3。

<一个href=\"https://developer.apple.com/library/mac/releasenotes/DeveloperTools/RN-X$c$c/Chapters/Introduction.html\" rel=\"nofollow\">https://developer.apple.com/library/mac/releasenotes/DeveloperTools/RN-X$c$c/Chapters/Introduction.html

在LLVM 3.5版本还东西应该是在这个版本的编译器:编译器'基于LLVM的3.6 SVN分支,它的存在之前LLVM.org的3.6版本(有点混乱,我知道)<。 / p>

http://clang.llvm.org/cxx_status.html

他们没有对C版本支持类似的得心应手页面,但是。

<一个href=\"http://llvm.org/releases/3.5.0/tools/clang/docs/UsersManual.html#differences-between-various-standard-modes\" rel=\"nofollow\">http://llvm.org/releases/3.5.0/tools/clang/docs/UsersManual.html#differences-between-various-standard-modes

在事实上,它看起来像我的文档甚至没有准确地反映铛3.5的C11支持。


所以基本上,如果文档不明确掩盖它,你就必须熟悉编译器。

X $ C $ 6.3Ç支持C89 / C90,C94,C99,C11和C语言的特点。我相信OS X提供全部库支持高达C99。 OS X不包括C11标准库的实施方案,但是一些C11头可能由编译器提供。 &LT; threads.h方式&gt; 是没有,不过

This is from my terminal:

Korays-MacBook-Pro:~ koraytugay$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix

There are 3 C standards as far as I know, ANSI C, C99 and C11.

How can I know which library I have and what my compiler supports?

解决方案

You have to find the documentation for your compiler and/or operating system and it's not always clearly documented.


Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)

This corresponds to Xcode 6.3.

https://developer.apple.com/library/mac/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html

Also anything in the LLVM 3.5 release should be in this version of the compiler: the compiler is 'based on the llvm 3.6 svn branch, which exists prior to LLVM.org's 3.6 release (a bit confusing, I know).

http://clang.llvm.org/cxx_status.html

They don't have a similar handy page for C version support, however.

http://llvm.org/releases/3.5.0/tools/clang/docs/UsersManual.html#differences-between-various-standard-modes

In fact it looks to me like the documentation doesn't even accurately reflect clang 3.5's C11 support.


So basically, if the documentation doesn't clearly cover it, you just have to be familiar with the compiler.

Xcode 6.3 supports C language features for C89/C90, C94, C99, and C11. I believe OS X offers full library support up to C99. OS X does not include an implementation of the C11 standard library, however some C11 headers may be provided by the compiler. <threads.h> isn't, however.

这篇关于我怎么能明白我的标准库,并在我的电脑上编译什么标准GCC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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