发布于 3年前

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

在AS工程中,编译遇到下面错误:
error: #error This file requires compiler and library support for the ISO C++ 2011 standard

原因:
根据报错信息,编译文件和so需要对c++11支持

解决办法:

1、在CMakeLists.txt文件里的上方添加

SET( CMAKE_CXX_FLAGS "-std=c++11 -O3")
#或SET(CMAKE_CXX_FLAGS "-std=c++0x"),-O3和0x有什么区别?

2、升级NDK版本到最新

C++
©2020 edoou.com   京ICP备16001874号-3