在Clang中设置为默认C ++ 11 [英] Set as default C++11 in Clang
本文介绍了在Clang中设置为默认C ++ 11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
LLVM C ++编译器完全支持C ++ 11标准。有没有一种方法可以将C ++ 11设置为默认标准,而无需每次都添加 -std = c ++ 11
编译器标志?我尝试将 CCXFLAGS
环境变量设置为 -std = c ++ 11
,但是没有运气。
The LLVM C++ compiler has full support for C++11 standard. Is there a way to set C++11 as the default standard without adding -std=c++11
compiler flag every time? I tried setting CCXFLAGS
environment variable to -std=c++11
, but with no luck.
推荐答案
使用clang 6.0.0或更高版本。默认的C ++方言现在为C ++ 14。
Use clang 6.0.0 or higher. The default C++ dialect is now C++14.
http://releases.llvm.org/6.0.1/tools/clang/docs/ReleaseNotes.html#c-language- -语更改
这篇关于在Clang中设置为默认C ++ 11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文