码迷,mamicode.com
首页 > 其他好文 > 详细

Undefined symbols for architecture i386: "_deflate", referenced from:

时间:2016-02-29 16:23:30      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:

Undefined symbols for architecture i386:
  "_deflate", referenced from:
      PlatCompress(enumCompressOperation, CompressCookie*, void*, long) in         libMo.a(tlplatcompress.o)
  "_deflateEnd", referenced from:
      PlatCompress(enumCompressOperation, CompressCookie*, void*, long) in libMo.a(tlplatcompress.o)
  "_deflateInit_", referenced from:
      StartCompression(enumCompressOperation, unsigned char, long (*)(void*, void*, long), void*, void**) in libMo.a(tlplatcompress.o)
  "_deflateParams", referenced from:
      StartCompression(enumCompressOperation, unsigned char, long (*)(void*, void*, long), void*, void**) in libMo.a(tlplatcompress.o)
  "_inflate", referenced from:
      PlatCompress(enumCompressOperation, CompressCookie*, void*, long) in libMo.a(tlplatcompress.o)
  "_inflateEnd", referenced from:
      PlatCompress(enumCompressOperation, CompressCookie*, void*, long) in libMo.a(tlplatcompress.o)
  "_inflateInit_", referenced from:
      StartCompression(enumCompressOperation, unsigned char, long (*)(void*, void*,  long), void*, void**) in libMo.a(tlplatcompress.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)




遇到这样的错误 。是缺少libz.dylib文件。

Xcode 7.0 之后要手动添加
添加方法:

  1. Go to Build Phases >Link Binary with Librairies > + > Add other
  2. Once in the file selection window do “CMD”+Shift+G (Go to folder) and type /usr/lib/
  3. From /usr/lib you can add : libz.dylib and more…
  4. Compile and have fun

 

is unavailable no availabel on ios (app extension) - use view controller

Targers-->Build Settings-->Build Options--> Require Only App-Extension-Safe -->NO

 

Undefined symbols for architecture i386: "_deflate", referenced from:

标签:

原文地址:http://www.cnblogs.com/qingjoin/p/5227311.html

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