原地址:
http://blog.youkuaiyun.com/joeblackzqq/article/details/25985299
cData.cpp:355:30:error:format not a string literal and no fomat arguments [-Werror=format-security]
cData.cpp:387:42:error:format not a string literal and no fomat arguments [-Werror=format-security]
cc1plus.exe:some warnings being treated as errors
原因:
android-ndk-r9与Eclipse的版本不兼容问题
方案之一(我搜到的):
在对应项目的proj.android/jni/Application.mk添加一句话
APP_CFLAGS += -Wno-error=format-security
意思就是无视这个error
可以解决编译出错问题, 如有更好方案, 请不吝赐教.
本文解决了一个关于Android NDK r9版本与Eclipse不兼容导致的编译错误问题。通过在Application.mk文件中添加特定的编译选项,可以忽略特定的安全格式警告并成功完成编译。
2755

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



