title: ld: library not found for -lz
body: <p>This is driving me crazy, when i try to compile on the simulator, everything is ok, but on the device i got this error:</p>
  
  <pre><code>ld: library not found for -lz
  Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1
  </code></pre>
  
  <p>Please help me understand the source of the problem:</p>
  
  <pre><code>    Ld /Users/ZConsulting/Library/Developer/Xcode/DerivedData/Fontenay-sous-Bois-dhlecgdgtoldsadoctkyueriyius/Build/Products/Debug-iphoneos/Fontenay-sous-Bois.app/Fontenay-sous-Bois normal armv7
          cd /Users/ZConsulting/Desktop/Fontenay-sous-Bois
          setenv IPHONEOS_DEPLOYMENT_TARGET 5.0
          setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
          /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -L/Users/ZConsulting/Library/Developer/Xcode/DerivedData/Fontenay-sous-Bois-dhlecgdgtoldsadoctkyueriyius/Build/Products
  /Debug-iphoneos -F/Users/ZConsulting/Library/Developer/Xcode/DerivedData/Fontenay-sous-Bois-dhlecgdgtoldsadoctkyueriyius/Build/Products/Debug-iphoneos -F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
  /iPhoneOS5.0.sdk/Developer/Library/Frameworks -filelist /Users/ZConsulting/Library/Developer/Xcode/DerivedData/Fontenay-sous-Bois-dhlecgdgtoldsadoctkyueriyius/Build/Intermediates/Fontenay-sous-Bois.build/Debug-iphoneos/Fontenay-sous-Bois.build/Objects-normal/armv7/Fontenay-sous-Bois.LinkFileList -dead_strip -fobjc-arc -miphoneos-version-min=5.0 -framework SenTestingKit -lz -lz.1.1.3 -framework MobileCoreServices
   -framework SystemConfiguration -framework CFNetwork -framework CoreLocation -framework MapKit -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/ZConsulting/Library/Developer/Xcode/DerivedData/Fontenay-sous-Bois-dhlecgdgtoldsadoctkyueriyius/Build/Products/Debug-iphoneos/Fontenay-sous-Bois.app/Fontenay-sous-Bois
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I did import the libz.1.1.3.dylib framework:
  <img src="https://i.stack.imgur.com/VIRCs.png" alt="enter image description here"></p>
  
  <p>The only libz that i got in the Linked frameworks is the <code>libz.1.1.3.dylib</code>
  <img src="https://i.stack.imgur.com/ZTUjS.png" alt="enter image description here"></p>