码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-10-05 20:45:14      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:

Compile++ thumb  : cocos2dx_static <= CCCommon.cpp E:/cocos2d-x-2.x/cocos2d-x-2.1.4/projects/T3/proj.android/../../../cocos2dx/platform/android/CCCommon.cpp: In function ‘void cocos2d::CCLog(char const*, ...)‘:

E:/cocos2d-x-2.x/cocos2d-x-2.1.4/projects/T3/proj.android/../../../cocos2dx/platform/android/CCCommon.cpp:44:72: error: format not a string literal and no format arguments [-Werror=format-security]

E:/cocos2d-x-2.x/cocos2d-x-2.1.4/projects/T3/proj.android/../../../cocos2dx/platform/android/CCCommon.cpp: In function ‘void cocos2d::CCLuaLog(char const*)‘:

E:/cocos2d-x-2.x/cocos2d-x-2.1.4/projects/T3/proj.android/../../../cocos2dx/platform/android/CCCommon.cpp:54:77: error: format not a string literal and no format arguments [-Werror=format-security]

cc1plus.exe: some warnings being treated as errors

make: *** [obj/local/armeabi/objs/cocos2dx_static/platform/android/CCCommon.o] Error 1 /cygdrive/e/android/android-ndk-r9/build/core/build-binary.mk:348: recipe for target ‘obj/local/armeabi/objs/cocos2dx_static/platform/android/CCCommon.o‘ failed

 

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

APP_CPPFLAGS += -Wno-error=format-security

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

标签:

原文地址:http://www.cnblogs.com/H-K-Home/p/4856215.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!