我是靠谱客的博主 失眠金针菇,最近开发中收集的这篇文章主要介绍cocos2d-x-2.1.4在NDK r9下的编译问题,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

jni/../../../cocos2dx/platform/android/CCCommon.cpp: In function 'void cocos2d::CCLog(char const*, ...)':
jni/../../../cocos2dx/platform/android/CCCommon.cpp:44:72: error: format not a string literal and no format arguments [-Werror=format-security]
jni/../../../cocos2dx/platform/android/CCCommon.cpp: In function 'void cocos2d::CCLuaLog(char const*)':
jni/../../../cocos2dx/platform/android/CCCommon.cpp:54:77: error: format not a string literal and no format arguments [-Werror=format-security]
cc1plus: some warnings being treated as errors
make: *** [obj/local/armeabi/objs/cocos2dx_static/platform/android/CCCommon.o] Error 1


在Application.mk里面添加下面代码

APP_CPPFLAGS += -Wno-error=format-security

官网已经有人解决了

参考资料

http://cocos2d-x.org/boards/6/topics/33525?r=33579#message-33579
http://blog.csdn.net/sgwhp/article/details/9663267

最后

以上就是失眠金针菇为你收集整理的cocos2d-x-2.1.4在NDK r9下的编译问题的全部内容,希望文章能够帮你解决cocos2d-x-2.1.4在NDK r9下的编译问题所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(37)

评论列表共有 0 条评论

立即
投稿
返回
顶部