Error format not a string literal and no format arguments解决方案
生活随笔
收集整理的這篇文章主要介紹了
Error format not a string literal and no format arguments解决方案
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
From:?http://www.cnblogs.com/hhuang2012/p/3336911.html
場景: cocos2dx 跨平臺開發(fā), 移植Android版本時(shí), 當(dāng)進(jìn)行到build_native.sh步驟后
ndk版本:?android-ndk-r9
開發(fā)環(huán)境: mac os 64bit, Android+Eclipse
BUG:
CCCommon.cpp:54:77: error: format not a string literal and no format arguments [-Werror=format-security]
原因:
android-ndk-r9與Eclipse的版本不兼容問題
方案之一(我搜到的):
在對應(yīng)項(xiàng)目的proj.android/jni/Application.mk添加一句話
APP_CFLAGS += -Wno-error=format-security
意思就是無視這個(gè)error
可以解決編譯出錯(cuò)問題, 如有更好方案, 請不吝賜教.
總結(jié)
以上是生活随笔為你收集整理的Error format not a string literal and no format arguments解决方案的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 表单元素 开篇
- 下一篇: 通过iscsi配置在aix上挂载存储设备