Error format not a string literal and no format arguments解决方案
2015-08-26 22:30
477 查看
From: /article/7122535.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
可以解决编译出错问题, 如有更好方案, 请不吝赐教.
场景: 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
可以解决编译出错问题, 如有更好方案, 请不吝赐教.
相关文章推荐
- 此博客将停止更新
- 算法时间复杂度的计算 [整理]
- linux shell 之if-------用if做判断
- How to use the Service Bus relay service
- 第一个只出现一次的字符
- mac 下 sphinx + mysql + php 实现全文搜索(xampp)(1)
- ZOJ 3329 One Person Game
- Linux回调函数
- angularjs 页面返回 参数传递
- 叶存菜鸟笔记JAVA反射机制的一般应用
- wince 常见问题 1
- Linux下NAO机器人开发环境搭建完全教程(Version2.0)
- JVM 内存设置大小(Xms Xmx PermSize MaxPermSize)
- UI基础:DataPersistent.沙盒
- Ubuntu MySQL允许远程连接数据库访问
- 归并排序(含完整源码)
- Android非5.0系统下singleTask singleInstance startActivityForResult
- thinkinginjava学习笔记03_基本语法
- requestAnimationFrame,Web中写动画的另一种选择
- HDU 4009 Transfer water