clang c11 threads.h找不到 [英] clang c11 threads.h not found

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

问题描述

我试图在xcode ...中设置一个c11线程示例,但它似乎没有threads.h头,虽然它不是关于这里描述的宏:


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 integer constant 1, intended to indicate that the implementation does not support the <threads.h> header.

解决方案

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.

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

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