#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")

重新編譯即可。

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