简体   繁体   English

错误:Apple Mach-O链接器(Id)警告

[英]Error:Apple Mach-O Linker (Id) Warning

In my app I have been working to import and export the database. 在我的应用程序中,我一直在努力导入和导出数据库。

I have imported some files which is required for this functionality but when i try to run the app in simulator the errors listed below occurs. 我已经导入了此功能所需的一些文件,但是当我尝试在模拟器中运行该应用程序时,会出现以下错误。 I can't understand which type of errors are these. 我不明白这些错误类型。 so plz help me solve this problem. 所以请帮我解决这个问题。

Undefined symbols for architecture i386:
  "_inflateInit2_", referenced from:
      -[NSData(NSDataExtension) gzipInflate] in NSData+CocoaDevUsersAdditions.o
  "_inflate", referenced from:
      -[NSData(NSDataExtension) gzipInflate] in NSData+CocoaDevUsersAdditions.o
  "_inflateEnd", referenced from:
      -[NSData(NSDataExtension) gzipInflate] in NSData+CocoaDevUsersAdditions.o
  "_deflateInit2_", referenced from:
      -[NSData(NSDataExtension) gzipDeflate] in NSData+CocoaDevUsersAdditions.o
  "_deflate", referenced from:
      -[NSData(NSDataExtension) gzipDeflate] in NSData+CocoaDevUsersAdditions.o
  "_deflateEnd", referenced from:
      -[NSData(NSDataExtension) gzipDeflate] in NSData+CocoaDevUsersAdditions.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

You didn't include the libz.tbd where those functions are. 这些功能所在的位置没有包含libz.tbd。 Select the project node, select your target, go to the Build Phases tab, expand "Link Binaries With Libraries", add libz.dylib, and try again. 选择项目节点,选择目标,转到“构建阶段”选项卡,展开“使用库链接二进制文件”,添加libz.dylib,然后重试。

将libz.dylib添加到您的框架中,它将起作用。

我遇到了同样的问题,感谢Jano,在我将Libz.dylib添加到项目中之后,该问题得以解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM