在使用 make 编译工程时可能会遇到:
#error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
我们需要找到当前编译工程中的 CMakeList.txt
, 然后在里面直接加入:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
重新编译即可。