Clang:无法找到C ++ 11标题 [英] Clang : Failed to find C++11 headers
问题描述
我试图建立所有的例子在Crow库中与铛3.6和我可以看到CC / CXX已被发现正确使用铛3.6。它使用cmake,我不是很熟悉。
I am trying to build all the examples in the Crow library with clang 3.6 and I can see the CC/CXX has been found properly by using clang 3.6. It uses cmake which I am not quite familiar with.
但它没有找到C ++ 11标题。
However it failed to find C++11 headers.
错误如下:
未来的档案找不到
'future' file not found
似乎libstdc ++没有正确指定,或者有些人认为它需要自己编译libstdc ++。
It seems that the libstdc++ is not specified properly, or some people reckon it needs to build the clang libstdc++ myself.
任何人都可以散发一些光这将是非常感激。
Anyone can shed some light on this will be much appreciated.
推荐答案
所以基于前面的注释,问题是,你不启用C ++ 11
So based on the previous comment the issue is that you don't enable the C++ 11 mode in Clang.
在引用的问题,问题只是你不向Clang(或将来的GCC)寻找C ++头。
As in referenced question, the issue is simply that you do not say to Clang (or in future for GCC) to look for C++ headers.
Clang的命令行是gcc兼容的,因此您必须通过followinf命令行开关启用C ++ 11支持
"Clang's command line is gcc-compatible so you have to enable C++11 support via the followinf command-line switch"
-std=c++11
如果在这之后你所需要做的就是编写你的C ++ 11代码。如果你使用Makefile,你应该添加到你的CXX参数命令行切换到Clang。
If after this you all you have to do is to write your C++ 11 code. If you use Makefiles you should add to your CXX arguments the command line switch to Clang.
这篇关于Clang:无法找到C ++ 11标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!