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
本文介绍了解决Cocos2d-x项目中出现的格式安全性警告错误的方法,建议将NDK版本更换为r8e或在Application.mk文件中添加特定的编译标志以忽略此警告。
3093

被折叠的 条评论
为什么被折叠?



