铛C11 threads.h未找到 [英] clang c11 threads.h not found

查看:921
本文介绍了铛C11 threads.h未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立以x code一C11线程的例子...但它似乎不具备threads.h头,虽然它不是complaning这里描述的宏:结果
<一href=\"http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf\">http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf

I am trying to setup a c11 thread example in xcode... but it doesn't seem to have the threads.h header, though it isn't complaning about the macro described here:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf

__ STDC_NO_THREADS__The整型常量1,意在表明该实现不支持的&lt;&threads.h GT;头。

__STDC_NO_THREADS__The integer constant 1, intended to indicate that the implementation does not support the <threads.h> header.


推荐答案

通过我的机器上铛(诉3.2在Ubuntu / Linux)的该功能测试宏没有定义。该功能支持将需要在C库的支持,这通常不来与编译器。所以基本上对铛答案不会比GCC很大的不同,他们通常建立在相同的C库,即glibc的,看的这里的答案GCC

With the clang on my machine (v. 3.2 on ubuntu/linux) that feature test macro isn't defined. Support for that feature will need support in the C library, that usually doesn't come with the compiler. So basically the answer for clang will not be much different than for gcc, they usually build upon the same C library, namely glibc, see here for answer for gcc.

这篇关于铛C11 threads.h未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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