1

My XCode version is 4.2 for iOS 5.0. I choose "LLVM GCC 4.2" as the compiler. When I compile my project, it show me the following error:

ld: warning: directory not found for option '-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/gcc/arm-apple-darwin10/4.0.1'
ld: warning: directory not found for option '-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/gcc/arm-apple-darwin10/4.2.1'
ld: library not found for -lz.1.2.3
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1

Please help me figure out why this is happening and how to fix it.

Image

Michael Price
  • 8,088
  • 1
  • 17
  • 24
user901737
  • 11
  • 1
  • 3
  • Can you look in your filesystem and see if either of those directories exist? If they don't, how far down the path can you get? – Michael Price Oct 27 '11 at 02:47

1 Answers1

1

The libz.1.2.3 library does not exist anymore (or at least is not included in the SDK). In your project settings, link with a newer version of the library like libz.1.2.5.

jbat100
  • 16,757
  • 4
  • 45
  • 70
  • 4
    @user901737 Would you mind posting an Answer here with the details of *how* you solved this? I would bet there are lots of other people having this problem and your solution could help others in the future! – chown Nov 10 '11 at 15:36