Objective C 中的 epub 文件错误

发布于 2025-01-03 08:51:33 字数 1263 浏览 2 评论 0原文

我是 iPad 开发人员的新手,我想在我的项目中创建 ePub 文件,

我从 这里 我遇到了一个问题。

我在我的项目中遇到此错误...

ld: warning: ignoring file /Users/krunal/Downloads/EpubReader/libz.1.2.3.dylib, missing required architecture i386 in file
Undefined symbols for architecture i386:

"_inflateEnd", referenced from:
_unzCloseCurrentFile in unzip.o

"_inflateInit2_", referenced from:
_unzOpenCurrentFile3 in unzip.o

"_get_crc_table", referenced from:
_unzOpenCurrentFile3 in unzip.o
_zipOpenNewFileInZip3 in zip.o

"_crc32", referenced from:
_unzReadCurrentFile in unzip.o
_zipWriteInFileInZip in zip.o
-[ZipArchive addFileToZip:newname:] in ZipArchive.o

"_inflate", referenced from:
_unzReadCurrentFile in unzip.o

"_deflateInit2_", referenced from:
_zipOpenNewFileInZip3 in zip.o

"_deflate", referenced from:
_zipWriteInFileInZip in zip.o
_zipCloseFileInZipRaw in zip.o

"_deflateEnd", referenced from:
_zipCloseFileInZipRaw in zip.o

ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如何解决此错误,有什么想法吗?

提前致谢!!

I am new to iPad developer and i want to create ePub file in my project,

I downloaded sample epub file, from here
and im stuck with a problem.

i am getting this errors in my project...

ld: warning: ignoring file /Users/krunal/Downloads/EpubReader/libz.1.2.3.dylib, missing required architecture i386 in file
Undefined symbols for architecture i386:

"_inflateEnd", referenced from:
_unzCloseCurrentFile in unzip.o

"_inflateInit2_", referenced from:
_unzOpenCurrentFile3 in unzip.o

"_get_crc_table", referenced from:
_unzOpenCurrentFile3 in unzip.o
_zipOpenNewFileInZip3 in zip.o

"_crc32", referenced from:
_unzReadCurrentFile in unzip.o
_zipWriteInFileInZip in zip.o
-[ZipArchive addFileToZip:newname:] in ZipArchive.o

"_inflate", referenced from:
_unzReadCurrentFile in unzip.o

"_deflateInit2_", referenced from:
_zipOpenNewFileInZip3 in zip.o

"_deflate", referenced from:
_zipWriteInFileInZip in zip.o
_zipCloseFileInZipRaw in zip.o

"_deflateEnd", referenced from:
_zipCloseFileInZipRaw in zip.o

ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How to solve this errors, any idea ?

Thanks In Advance !!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

水染的天色ゝ 2025-01-10 08:51:33

日志似乎表明问题来自 libz.1.2.3.dylib 框架。

您使用什么 iOS SDK(以及哪个 Xcode 版本)?

在您的项目中,单击您的目标并转到“构建阶段”选项卡,然后转到“将二进制文件与库链接”部分。

尝试删除 libz.1.2.3 框架,然后重新添加 libz.1.2.5(单击窗口底部的小“+”并从列表中选择 libz.1.2.5)。

编辑:

正如 Abizern 在下面的评论中所述,添加 libz.dylib 而不是 libz.1.2.5.dylib 应该可以解决问题。这应该链接到最新版本的库(请参阅此问题和答案 此处)。

The logs seem to indicate that the problem is coming from the libz.1.2.3.dylib framework.

What iOS SDK are you using (and which Xcode version) ?

In your project, click on your target and go to the Build Phases tab, then "Link binary with libraries" section.

Try removing the libz.1.2.3 framework and then re-adding the libz.1.2.5 (click on the little "+" at the bottom of the window and select libz.1.2.5 from the list).

EDIT:

As stated by Abizern in below comment, adding libz.dylib instead of libz.1.2.5.dylib should do the trick. This should link to the latest version of the lib (see this question and answers here).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文