26

When trying to compile the software for iOS 5, XCode 4.2 throws an error:

ld: library not found for -lz.1.2.3

I found this post that tells me to replace 1.2.3. with 1.2.5

https://github.com/dbloete/ioctocat/issues/107

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

Has anyone encountered the above situation? How can I resolve this so that it will not fail between the different versions of SDK?

Zhen
  • 12,361
  • 38
  • 122
  • 199

1 Answers1

51

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.

Alastair Stuart
  • 4,165
  • 3
  • 36
  • 33
  • 4
    For people like me who don't know how to change the framework, check this out: http://stackoverflow.com/questions/3352664/how-to-add-existing-frameworks-in-xcode-4 – Jamund Ferguson Oct 30 '11 at 02:55