问题描述
我在将用于 zip 提取的库添加到我的 iPhone 应用程序时遇到问题.
I have a problem adding libs for zip extraction to my iPhone app.
我决定使用 SSZipArchive.它使用 minizip.
I decided to use SSZipArchive. It uses minizip.
按照说明操作后:
1 添加 SSZipArchive.h、SSZipArchive.m 和 minizip
2 将 libz 库添加到您的目标
我仍然遇到错误:
未找到符号.
我尝试将 -lz 添加到其他链接器标志并添加 lybz.dylib 但它没有帮助.如果您知道如何让 libz 在这里工作,请告诉我.
I tried adding -lz to Other Linker Flags and adding lybz.dylib but it didn't help. Please let me know if you know how to get libz to work here.
已解决:我没有使用文件夹,而是创建了一个黄色参考组,从包含中删除了/minizip/,现在一切正常.
Solved: Instead of using a folder, I made a yellow reference group, removed /minizip/ from includes and now everything works.
推荐答案
unzOpen
、unzOpenCurrentFile
和 unzOpenCurrentFilePassword
是 minizip 中定义的函数图书馆.链接器抱怨它找不到这些函数,这意味着它们没有被正确编译或链接.
unzOpen
, unzOpenCurrentFile
, and unzOpenCurrentFilePassword
are functions defined in the minizip library. The linker is complaining that it can't find those functions, which means they're not getting compiled or linked in properly.
确保 minizip/unzip.c
正确包含在您的项目中,并仔细检查它是否正在编译和链接.
Make sure that minizip/unzip.c
is included in your project properly and double-check that it's getting compiled and linked.
这篇关于未找到 zlib 构建 b/c 符号失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!