最近用buildroot2019.08.2编译系统,执行到grantlee时报错,报错信息就是:
error: #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.
参考文章:https://stackoverflow.com/questions/10851247/how-do-i-activate-c-11-in-cmake
通过在CMakeLists.txt文件中添加SET(CMAKE_CXX_FLAGS "-std=c++0x")开启c++11的支持。
首先在grantlee文件夹下查找所有的CMakeLists.txt文件:
依次修改:
全部修改完后,编译即可