Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode cannot resolve zlib symbols

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?

like image 376
TheFrancisOne Avatar asked May 25 '11 14:05

TheFrancisOne


1 Answers

In Xcode 4 have a look at your Build Phases.

Go to the 3rd section - Link Binary with libraries

Click the + button

choose libz.dylib in the drop down. enter image description here

like image 145
Abizern Avatar answered Oct 25 '22 06:10

Abizern