I use the zlib library to do data compression in a command line tool for Mac.
On Xcode 4, I get an error “undefined symbol” on zlib functions.
I search for the libz.dylib on mac computer and I find 3 files in /Developer/Platforms/iPhoneOS.platform.
Nothing in /Developer/Platforms/MacOSX.platform.
Why? Where I can find my libz.dylib library for architeture i386?
In Xcode 4 have a look at your Build Phases.
Go to the 3rd section – Link Binary with libraries
Click the
+buttonchoose libz.dylib in the drop down.
