当前位置 博文首页 > 一杯凉白开:buildroot编译grantlee报错要开启c++11

    一杯凉白开:buildroot编译grantlee报错要开启c++11

    作者:[db:作者] 时间:2021-09-10 16:37

    最近用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文件:

    CMakeLists.txt

    依次修改:

    add

    全部修改完后,编译即可

    cs
    下一篇:没有了