cocos2d-x在NDK r9下的编译问题

Compile++ thumb  : cocos2dx_static <=CCCommon.cpp
jni/../../../cocos2dx/platform/CCCommon.cpp:Infunction'void cocos2d::CCLog(char const*, ...)':
jni/../../../cocos2dx/platform/CCCommon.cpp:177:69: error: format not a string literal andno format arguments [-Werror=format-security]
cc1plus.exe: some warnings being treated as errors /cygdrive/d/Android-NDK/build/core/build-binary.mk:348: recipe for target `obj/local/armeabi/objs-debug/cocos2dx_static/platform/CCCommon.o' failed
make: *** [obj/local/armeabi/objs-debug/cocos2dx_static/platform/CCCommon.o] Error 1
make: Leaving directory `/cygdrive/e/client/OFF_Line/cocos2d-1.0.1-x-0.12.0/ShootArrow2_for_Renren/android'

如果控制台输入了以上的错误信息,最好将NDK换回r8e版本
或者
在Application.mk里面添加下面代码 APP_CPPFLAGS += -Wno-error=format-security

上一篇:Java 学习笔记提高篇


下一篇:C语言中malloc()和calloc()c函数用法