NSObjCRuntime错误解析
2015-11-17 16:12
337 查看
1.[Xcode]非Objc文件(c, c++)引起的NSObjCRuntime错误解析
1.以下是错误实力#if DEBUG
#define NSLog(FORMAT, …) fprintf(stderr,”[%s:%d行] %s\n”,[[[NSString stringWithUTF8String:FILE] lastPathComponent] UTF8String], LINE, [[NSString stringWithFormat:FORMAT, ### #VA_ARGS] UTF8String]);
#else
#define NSLog(FORMAT, …) nil
#import
#import “UIViewExt.h”
#endif
2.正确顺序#import
#import “UIViewExt.h”
#if DEBUG
#define NSLog(FORMAT, …) fprintf(stderr,”[%s:%d行] %s\n”,[[[NSString stringWithUTF8String:FILE] lastPathComponent] UTF8String], LINE, [[NSString stringWithFormat:FORMAT, ### #VA_ARGS] UTF8String]);
#else
#define NSLog(FORMAT, …) nil
#endif
今天在objc工程中,导入一些c、c++文件时,,编译引起了NSObjCRuntime错误,,,仔细检查发现,原来是在SK_Prefix.pch中,用上边错误的写法,花了好久才找到原因,分享给你们!
相关文章推荐
- mysql保障数据一致性:redis与mysql数据同步(二)
- ExpandableListView可手动添加简单分组功能
- ios 截图,并使用指定的区域裁剪
- hdu-3183A Magic Lamp(贪心)
- Activity和Service绑定
- 深度学习模型之各种caffe版本(Linux和windows)的网址和配置
- TableView编辑中实现多行删除方法以及注意
- 用rabbitMQ实现生产者消费者
- 【黑马程序员】C语言运算符
- sql2008 启动报错:应用程序的组件中发生了无法处理的异常和值不能为空 viewinfo(已解决!)
- 机器视觉之 ICP算法和RANSAC算法
- 产品思路
- 老码农教你学英语
- 图片压缩成指定大小
- 数据库事务介绍
- Sharepoint中出现webpart部署之后却找不到的一种情况
- Jquery操作Cookie
- Windows Server 2008 R2(x64) IIS7+PHP5(FastCGI)环境搭建
- 常用的监测系统状态shell脚本
- 2015年rctf web150 (Update set 二次注入)