C11 GCC threads.h没有发现? [英] C11 GCC threads.h not found?

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

问题描述

以下code

#include <threads.h>

给我这个错误:

fatal error: threads.h: No such file or directory

使用最新的海湾合作​​委员会,并与锵-std = C11。

Using the latest GCC and Clang with -std=c11.

时的C11穿线不被GCC和支持锵?或者是有一个黑客(或东西安装)得到它?我只是在使用Ubuntu 14.04与Ubuntu的回购gcc和铿锵的包。

Is C11 threading not supported by GCC and Clang? Or is there a hack (or something to install) to get it? I'm just using Ubuntu 14.04 with the gcc and clang packages from the Ubuntu repo.

推荐答案

GCC 文件的 C11状态表明,它不支持线程,它说:

The gcc document C11 status indicates that it does not support threading, it says:

线程[可选] |图书馆的问题(未实现)

Threading [Optional] | Library issue (not implemented)

由于这份文件指出,这是不是一个真正的 GCC 的问题,但的glibc 问题。正如扎克指出,它看起来像有可能是正在进行很快获得这种支持到的glibc 但不会帮助你了。
您可以使用
在其间。

As the document indicates this is not really a gcc or clang issue but glibc issue. As Zack pointed out it looks like there may be work under way soon to get support for this into glibc but that won't help you now. You can use this in the meantime.

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

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