ndk编译错误:error: ‘nullptr’ was not declared in this scope
nullptr是C++11引入的新特性,解决C和C++中NULL的定义不一致所带来的编译器兼容问题。C中NULL是指向0地址的指针(void *)0,c++中则是定义为整数0.
ndk中解决这个问题的办法就是添加对C++11的支持,在Android.mk中添加“”-std=c++11“”:
LOCAL_CFLAGS := ********
LOCAL_CFLAGS += -std=c++11