error This file requires compiler and library support for the ISO C++ 2011 standard.

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/handsome_for_kill/article/details/54382149

error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

当使用CMAKE编译工程时,出现这个错误,解决办法:
在工程主目录的CMakeLists.txt中添加如下,可以编译成功:

SET( CMAKE_CXX_FLAGS "-std=c++11 -O3")

猜你喜欢

转载自blog.csdn.net/handsome_for_kill/article/details/54382149
今日推荐