体系结构i386的未定义符号:“ _deflate”,从libMo.a中的PlatCompress(enumCompressOperation,CompressCookie *,void *,long)引用

2020/12/01 03:22 · ios ·  · 0评论

我正在使用SUP做本机iOS应用程序。我已经包含了该库,并在Xcode中给出了链接路径。在构建时出现以下错误:

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)

请帮助我解决该错误。我是使用SUP进行本机iOS开发的新手。

谢谢。

我也有同样的错误。

从目标-> Build Phases选项卡-> Link Binaries With Librarieslibz.dylib添加到框架中,

希望对您有用。

注意:如果找不到libz.dylib,请尝试添加libz.tbd

从Xcode 7开始,而不是添加libz.dylib,您应该这样做:

  • 转到项目Build Settings选项卡
  • 搜索 Other Linker Flags
  • 添加-lz为链接器标志(请参见屏幕截图)
  • Product菜单中,选择Clean再构建之前

lz链接选项

体系结构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库

为此:

  1. 转到目标部分
  2. 构建阶段选项卡
  3. 将二进制文件与库链接
  4. 点击+按钮
  5. 搜索libz.dylib
  6. 单击添加按钮。

1.转到目标部分

2.构建阶段选项卡

3.将二进制文件与库链接

4.单击+按钮

5.搜索libz.tbd(或libz.dylib)

6.单击添加按钮。

本文地址:http://ios.askforanswer.com/tixijiegoui386deweidingyifuhao-_deflateconglibmo-azhongdeplatcompressenumcompressop.html
文章标签: ,   ,   ,  
版权声明:本文为原创文章,版权归 admin 所有,欢迎分享本文,转载请保留出处!

文件下载

老薛主机终身7折优惠码boke112

上一篇:
下一篇:

评论已关闭!