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

时间:2022-04-10 16:07:18
Compile++ thumb : cocos2dx_static <= CCCommon.cpp
jni/../../../cocos2dx/platform/CCCommon.cpp: In function 'void cocos2d::CCLog(char const*, ...)':
jni/../../../cocos2dx/platform/CCCommon.cpp:177:69: error: format not a string literal and no 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