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

在使用 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")

重新编译即可。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章