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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Undefined symbols for architecture i386: "_deflate", referenced from:相关的知识,希望对你有一定的参考价值。

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:的主要内容,如果未能解决你的问题,请参考以下文章

Undefined symbols for architecture arm64:问题

Undefined symbols for architecture armv7错误解决方法

Undefined symbols for architecture xxx,出错总结

Cocoapods Undefined symbols for architecture armv7sarm64

static报错 Undefined symbols for architecture x86_64

解决Undefined symbols for architecture arm64问题