第三方库“zip achieve”,报错:Undefined symbols for architecture x86_64: "_deflate", referenced from: _zipWriteInFileInZip in zip.o _zipCloseFileInZipRaw64 in zip.o......

『导言』

今天,研究了下ZipArchive第三方压缩解压缩框架,拖入框架后出9个错误提示:

图,错误提示
  • 错误提示代码:
Undefined symbols for architecture x86_64:
  "_deflate", referenced from:
      _zipWriteInFileInZip in zip.o
      _zipCloseFileInZipRaw64 in zip.o
  "_deflateInit2_", referenced from:
      _zipOpenNewFileInZip4_64 in zip.o
  "_inflate", referenced from:
      _unzReadCurrentFile in unzip.o
  "_get_crc_table", referenced from:
      _unzOpenCurrentFile3 in unzip.o
      _zipOpenNewFileInZip4_64 in zip.o
  "_inflateEnd", referenced from:
      _unzCloseCurrentFile in unzip.o
  "_crc32", referenced from:
      _unzReadCurrentFile in unzip.o
      _zipWriteInFileInZip in zip.o
  "_deflateEnd", referenced from:
      _zipCloseFileInZipRaw64 in zip.o
  "_inflateInit2_", referenced from:
      _unzOpenCurrentFile3 in unzip.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
  • 重点:用zip achieve这个库需要导入libz.tdb
  • 方法一:

点击Project——>Targets——>``build phrase——>Linked frameworks and Libraries——>“+”——>搜索“libz.”---->双击“libz.tdb”——>command+R`

图.方法一添加过程
  • 方法二:

点击Project ——>Targets——>General——>Link binary with Library——>“+”——>搜索“libz.”---->双击“libz.tdb”——>command+R

图.方法二添加过程

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容