You have not linked against the correct libz file. If you right click the file and reveal in finder its path should be somewhere in an iOS sdk folder. Here is mine for example
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib
I recommend removing the reference and then re-adding it back in the Link Binary With Libraries section Build Phases of your target.
I had a similar issue last night and the problem was related to the fact that I had dragged a class from the Finder to my project in xCode. The solution was to go the the Build Phases tab and then the Compile Sources and make sure you drag the class to the list.
本文讨论了在Objective-C开发中遇到的链接库错误问题,并提供了通过正确配置文件路径和重新添加引用来解决问题的方法。同时强调了避免将类直接从Finder拖动到Xcode项目中的重要性。
569

被折叠的 条评论
为什么被折叠?



