尝试将 libz.1.2.3.dylib 添加到我的 ipad 项目时出现问题
首先,我现在在这个网站上,如果我在发布这个问题时犯了一些错误,我真的很抱歉。我正在尝试使用 zipArchive 类来管理 ipad 项目中的 zip 文件。
哪些步骤会重现该问题?
创建项目。
添加 ZipArchive 文件夹及其文件。
添加 libz.1.2.3.dylib
预期输出是什么?你看到了什么?
我对所有代码(关于 ziparchive)进行了注释,因此我的视图控制器中只有 #import #import "ZipArchive/ZipArchive.h",并且我希望构建项目时不会出现错误。
我在编译器中看到以下错误:
ld: warning: ignoring file /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2/Symbols/usr/lib/libSystem.dylib, 文件中缺少所需的架构 i386 ld:在 /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2/Symbols/usr/lib/libobjc.A.dylib 中,架构 i386 文件中缺少所需的架构 i386 Collect2: ld 返回 1 退出状态 命令 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 失败,退出代码 1
您使用的产品版本是什么?在什么操作系统上? 我正在 Mac os X 版本 10.6.7 上使用 xcode 4 和 4.2 ipad 模拟器的 ipad 项目,
请在下面提供任何其他信息。 我认为问题出在 libz.1.2.3.dylib 库上,并且我有一些客人可能存在问题:
libz.1.2.3.dylib 路径错误位于 iPhoneSimulator.platform 上,它是有效的ipad也可以吗??如果不是,我可以使用哪个库与 ipad 实现相同的目的??
我不确定我是否正确添加了 libz.1.2.3.dylib 库。我所做的是:右键单击资源文件夹 ->将文件添加到“myproject”->搜索 libz.1.2.3.dylib 并从编译器错误中看到的路径添加它的 4.2 版本。我还尝试添加到框架文件夹,得到相同的结果。
我正在阅读很多有关如何解决类似问题的帖子,但没有人可以帮助我。
知道我必须做什么来解决我的问题吗?
真的很感谢!!
First of all, i'm now on this site so really sorry if i'm commiting some error posting this question.I'm trying to use the zipArchive class to manage zip files in an ipad project.
What steps will reproduce the problem?
Create a project.
Add the ZipArchive folder with their files.
Add the libz.1.2.3.dylib
What is the expected output? What do you see instead?
I have all the code (about ziparchive) commented, so i only have the #import #import "ZipArchive/ZipArchive.h" in my viewcontroller, and i expect to build the project without errors.
I see the following error in the compiler:
ld: warning: ignoring file /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2/Symbols/usr/lib/libSystem.dylib, missing required architecture i386 in file
ld: in /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2/Symbols/usr/lib/libobjc.A.dylib, missing required architecture i386 in file for architecture i386
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
What version of the product are you using? On what operating system?
I'm using xcode 4 a project for the ipad with the 4.2 ipad simulator on a Mac os X version 10.6.7
Please provide any additional information below.
I think the problem is with the libz.1.2.3.dylib library, and I have some guest of where might be the problem:
The libz.1.2.3.dylib path error is on iPhoneSimulator.platform, it is valid for ipad too?? If is not, which lib could i use for the same purpose with the ipad??
I'm not sure i'm adding the libz.1.2.3.dylib lib correctly. What I have done is: right-click on Resources folder -> add files to "myproject" -> search for the libz.1.2.3.dylib and add the 4.2 version of it from the path u could see in the compiler errors. I also try to add to the frameworks folder with the same results.
I'm reading lots of posts about how to fix similar problems but no one could help me.
Any idea of what I have to do to fix my problem??
Really thanks!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要执行以下操作:
如果您使用的是 Xcode 4.5.2,下面的屏幕截图可能会帮助您完成步骤 2 到 5。我不确定其他版本的 Xcode 是否相同。
You need to do this:
If you are using Xcode 4.5.2 the screenshots below may aide you in proceeding through steps 2 through 5. I'm not sure if other versions of Xcode are the same or not.
如果您使用的是 xcode 4 或更高版本,那么 libz.1.2.3.dylib 似乎不包含在 iOS5 sdk 中。以下是解决此问题的简单方法:
在 XCode 4.2 中打开您的项目
从框架中删除 libz.1.2.3.dylib
添加新框架 libz.1.2.5
运行您的应用程序
它工作正常。
If you are using xcode 4 or upper version of it than it seems that libz.1.2.3.dylib is not included in iOS5 sdk. Here is simple method to fix this:
Open your project in XCode 4.2
Remove libz.1.2.3.dylib from framework
Add new framework libz.1.2.5
Run you app
It works fine.
libz.dylib 是最新版本(当前为 libz.1.2.5)的别名,因此您还可以导航到终端中的文件位置并创建一个名为“libz.1.2.3.dylib”的符号链接。
您还可以链接到 libz.dylib,我希望它始终指向实际的最新版本,这就是 Tricon 建议更改项目以仅包含 libz.dylib 的原因。我不确定我是否会删除任何内容,尽管这与添加新的符号链接没有太大不同……您仍然在 Xcode 的内部深处闲逛……
libz.dylib is an alias to the latest version (currently libz.1.2.5) so you can also navigate to the file's location in Terminal and create a symlink called "libz.1.2.3.dylib".
You could also link to libz.dylib, which I would expect to always point to the actual latest version, which is why Tricon recommends changing the project to just include libz.dylib. I'm not sure I'd delete anything, although it's not a whole lot different from adding a new symlink...you're still mucking around deep inside the guts of Xcode....