user1381821
user1381821

Reputation: 31

Apple Mach-O linker Error for libz.1.dylib framwork

Iam developing one application.In that i am using libz.1.dylib framework.And this application will be working fine in simulator.When i try to archive this application i got a error like Apple Mach-O linker error.And show the error like

/Users/wifin/Library/Developer/Xcode/DerivedData/StudyApp-fhamcsbyepwhdebjbmkfyfbroacl/Build/Intermediates/ArchiveIntermediates/IpadExStudyApp/InstallationBuildProductsLocation/Applications/StudyApp.app/StudyApp normal armv7
cd /Users/wifin/Desktop/K.V.Naresh/SmartSvn/27-04-2012
setenv IPHONEOS_DEPLOYMENT_TARGET 3.0
setenv PATH "/Users/wifin/Desktop/software/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Users/wifin/Desktop/software/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Users/wifin/Desktop/software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Users/wifin/Desktop/software/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -L/Users/wifin/Library/Developer/Xcode/DerivedData/StudyApp-fhamcsbyepwhdebjbmkfyfbroacl/Build/Intermediates/ArchiveIntermediates/IpadExStudyApp/BuildProductsPath/Release-iphoneos -F/Users/wifin/Library/Developer/Xcode/DerivedData/StudyApp-fhamcsbyepwhdebjbmkfyfbroacl/Build/Intermediates/ArchiveIntermediates/IpadExStudyApp/BuildProductsPath/Release-iphoneos -filelist /Users/wifin/Library/Developer/Xcode/DerivedData/StudyApp-fhamcsbyepwhdebjbmkfyfbroacl/Build/Intermediates/ArchiveIntermediates/IpadExStudyApp/IntermediateBuildFilesPath/StudyApp.build/Release-iphoneos/StudyApp.build/Objects-normal/armv7/StudyApp.LinkFileList -dead_strip -fobjc-arc -miphoneos-version-min=3.0 -lz -lsqlite3.0 -framework AVFoundation -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/wifin/Library/Developer/Xcode/DerivedData/StudyApp-fhamcsbyepwhdebjbmkfyfbroacl/Build/Intermediates/ArchiveIntermediates/IpadExStudyApp/InstallationBuildProductsLocation/Applications/StudyApp.app/StudyApp

ld: library not found for -lz clang: error: linker command failed with exit code 1 (use -v to see invocation)

So please tell me how to solve this error.

Upvotes: 0

Views: 1106

Answers (1)

Damo
Damo

Reputation: 12900

EDIT: Check that each module and lib you expect to be in the build are actually in the build

See this SO answer and this answer also for more clang errors and what to try.

You should still link against libz as a matter of course:

Instead of linking against libz.1.dylib you need to link against libz.dylib

Remove the entry for libz.1.dylib from your linker settings and add libz.dylib manually

enter image description here

Upvotes: 2

Related Questions