cocos2dx CCMenu.h:error: 'override' does not name a type

来源:互联网 发布:linux 当前目录大小 编辑:程序博客网 时间:2024/05/22 07:41

需要为Android NDK添加C++11标准支持 

C++11在Android NDK中已经支持了,本文主要介绍如何在NDK中添加C++11标准的支持。

在开源项目Cocos2d-x中,已经添加了C++11标准的支持。


1.修改Application.mk文件,添加NDK_TOOLCHAIN_VERSION

[plain] view plain copy
 print?
  1. NDK_TOOLCHAIN_VERSION=4.8  

2.添加APP_CPPFLAGS,在命令行编辑时支持C++11

[plain] view plain copy
 print?
  1. APP_CPPFLAGS := -frtti -std=c++11