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")
本文介绍了解决C++11标准支持问题的方法,在CMakeLists.txt文件中添加特定选项来启用C++11标准支持,从而确保编译过程正常进行。
85

被折叠的 条评论
为什么被折叠?



