码迷,mamicode.com
首页 > Web开发 > 详细

ASIHTTPRequest开源类项目导入问题及解决方法

时间:2015-06-11 11:09:04      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:asihttprequest

在静态库工程中添加ASIHTTPRequest导出lib.a,放到工程里编译出一下错:

Undefined symbols for architecture armv7:

  "_deflate", referenced from:

      -[ASIDataCompressor compressBytes:length:error:shouldFinish:] in lib.a(ASIDataCompressor.o)

  "_inflateInit2_", referenced from:

      -[ASIDataDecompressor setupStream] in lib.a(ASIDataDecompressor.o)

  "_deflateEnd", referenced from:

      -[ASIDataCompressor closeStream] in lib.a(ASIDataCompressor.o)

  "_inflateEnd", referenced from:

      -[ASIDataDecompressor closeStream] in lib.a(ASIDataDecompressor.o)

  "_kUTTagClassMIMEType", referenced from:

      +[ASIHTTPRequest mimeTypeForFileAtPath:] in lib.a(ASIHTTPRequest.o)

  "_kUTTagClassFilenameExtension", referenced from:

      +[ASIHTTPRequest mimeTypeForFileAtPath:] in lib.a(ASIHTTPRequest.o)

  "_deflateInit2_", referenced from:

      -[ASIDataCompressor setupStream] in lib.a(ASIDataCompressor.o)

  "_UTTypeCreatePreferredIdentifierForTag", referenced from:

      +[ASIHTTPRequest mimeTypeForFileAtPath:] in lib.a(ASIHTTPRequest.o)

  "_inflate", referenced from:

      -[ASIDataDecompressor uncompressBytes:length:error:] in lib.a(ASIDataDecompressor.o)

  "_UTTypeCopyPreferredTagWithClass", referenced from:

      +[ASIHTTPRequest mimeTypeForFileAtPath:] in lib.a(ASIHTTPRequest.o)

ld: symbol(s) not found for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation)


解决方法:

缺系统库的原因,添加以下库

libz.dylib

SystemConfiguration.framework

MobileCoreAServices.framework

CFNetwork.framework


完成




ASIHTTPRequest开源类项目导入问题及解决方法

标签:asihttprequest

原文地址:http://blog.csdn.net/feiyue0823/article/details/46453641

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!