Alex Rivera | Logout

libz.dylib versus libz.1.2.3.dylib versus libz.1.2.5.dylib

Asked 2011-08-03T20:39:03.080
34

I asked this in a comment but this seems like an issue that deserves its own question.

I have a project that's shared between three different installations of XCode and two different installations of the iOS SDK. At the moment unifying the developers involved is not an option.

When I installed the iOS 5 Beta and XCode 4.2 libz.1.2.3.dylib was nowhere to be found. I discovered that linking against libz.1.2.5.dylib handled this but this was not compatible with the other active installations of XCode and the iOS SDK.

I researched this online and discovered the above suggestion and this suggestion. The former doesn't work for me, and the latter makes me nervous.

So what's the difference between libz.dylib, libz.1.2.3.dylib and libz.1.2.5.dylib and can I safely link to the first across all installations of XCode and the iOS SDK?

Edit
Report

2 Answers

4

You can easily see in the finder how they work. In XCode, "Show in Finder" one of the libraries. Now click once on libz.dylib and "Get Info". You'll see that "Original" is:

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/libz.1.2.5.dylib (as of XCode4.2 with iOS 5 SDK)

So it's a symbolic link to version 1.2.5 for now. In the future it will update to the latest 1.x.x. You can examine all of the various versions this way.

answered 2011-11-12T05:28:52.880
3

Just link with libz.dylib instead of a specific version and compiler will link the available version on installed SDK. Linker error may come in case of linking with some specific version that is not available in currently installed SDK.

answered 2013-06-12T08:50:59.830

Your Answer