Error format not a string literal and no format arguments解决方案
生活随笔
收集整理的這篇文章主要介紹了
Error format not a string literal and no format arguments解决方案
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
From:?http://www.cnblogs.com/hhuang2012/p/3336911.html
場景: cocos2dx 跨平臺開發, 移植Android版本時, 當進行到build_native.sh步驟后
ndk版本:?android-ndk-r9
開發環境: 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的版本不兼容問題
方案之一(我搜到的):
在對應項目的proj.android/jni/Application.mk添加一句話
APP_CFLAGS += -Wno-error=format-security
意思就是無視這個error
可以解決編譯出錯問題, 如有更好方案, 請不吝賜教.
總結
以上是生活随笔為你收集整理的Error format not a string literal and no format arguments解决方案的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 表单元素 开篇
- 下一篇: 客户服务与工单管理系统—工单管理