Xcode 4.2链接错误:libz问题? [英] Xcode 4.2 link error: libz issue?

查看:109
本文介绍了Xcode 4.2链接错误:libz问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将项目移动到Xcode 4.2,对于像Xcode 4.0.3中编译和链接的项目,我得到了许多Mach-O链接器未解决的错误,例如_crc32,_expf和_UnwindSjLj_Register。

Moving a project to Xcode 4.2, I am getting a number of Mach-O linker unresolved errors, for things like _crc32, _expf, and _UnwindSjLj_Register, on a project that compiles and links fine in Xcode 4.0.3.

我怀疑这可能是一个libz问题,因为我之前的项目链接了libz.1.2.3.dylib。我删除了该引用,并添加了libz.1.2.5.dylib,它位于我的/Platforms/iPhoneOS.platform/DeviceSupport/5.0(9A5259f)/ Symbols 1 / usr / lib文件夹中。

I suspect this might be a libz issue, since my previous project linked libz.1.2.3.dylib. I removed that reference, and added libz.1.2.5.dylib, that is found in my /Platforms/iPhoneOS.platform/DeviceSupport/5.0 (9A5259f)/Symbols 1/usr/lib folder.

无论是否包含libz.1.2.5.dylib,我都得到相同的39个未解析的引用,所以看起来非常可疑。

I get the same 39 unresolved references whether I include libz.1.2.5.dylib or not, so it seems very suspicious.

推荐答案

链接 libz.dylib ,但是通过Build Phases选项卡添加它。

Link against the libz.dylib, but add it through the Build Phases tab.

项目>>目标>>构建阶段>>链接二进制文件库

Project >> Target >> Build Phases >> Link Binary With Libraries

按列表下的 + 并选择 libz.dylib 然后它将添加lib,以便它可以在SDK更新之间工作。

Press + under the list and select the libz.dylib then it will add the lib so it will work inbetween SDK updates.

这篇关于Xcode 4.2链接错误:libz问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆