We simply could not create a project after upgrading to Xcode 4.2. In our case, the error was:
ld: library not found for -lz.1.2.3 Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1
It turns out that this particular SDK library has changed versions, and the file we pointed to is no longer included in the latest distribution.
To fix this, I clicked on the libz.1.2.3.dylib entry in the Project Xcode navigation bar. (It was highlighted in red because its path was incorrect.) Next, on the Xcode Utility panel, on the File Inspector tab, I clicked on the Select File icon under the Location list, which is set to Relative to SDK . I went to / Developer / Platforms / iPhoneOS.platform / Developer / SDKs / iPhoneOS5.0.sdk / usr / lib / and found that libz.1.2.3.dylib does not exist, so I selected the latest version of libz.1.2.5 .dylib.
source share