ld:找不到-lz.1.2.3的库
当尝试编译iOS 5的软件时,XCode 4.2会抛出错误:
When trying to compile the software for iOS 5, XCode 4.2 throws an error:
ld: library not found for -lz.1.2.3
我发现这篇帖子告诉我要替换1.2.3。 1.2.5
I found this post that tells me to replace 1.2.3. with 1.2.5
https://github.com/dbloete / ioctocat / issues / 107
执行链接建议之后,它适用于XCode 4.2,但对于XCode的旧版本失败,错误
After doing what the link has suggested, it worked for XCode 4.2 but fails for older versions for XCode with the error
ld: library not found for -lz.1.2.5
有没有人遇到过上述情况?如何解决这个问题,以便在不同版本的SDK之间不会失败?
Has anyone encountered the above situation? How can I resolve this so that it will not fail between the different versions of SDK?
只需使用-lz,就没有了需要使用版本化链接。所以从框架中删除libz-1.2.5.dylib并添加libz.dylib。
Just use -lz, there's no need to use the versioned link to it. So remove libz-1.2.5.dylib from frameworks and add libz.dylib.