0

我正在开发一个应用程序。我正在使用 libz.1.dylib 框架。这个应用程序将在模拟器中正常工作。当我尝试归档这个应用程序时,我收到了一个错误,比如 Apple Mach-O 链接器错误。并显示错误喜欢

/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:找不到-lz clang的库:错误:链接器命令失败,退出代码为1(使用-v查看调用)

所以请告诉我如何解决这个错误。

4

1 回答 1

2

编辑:检查您希望在构建中的每个模块和库是否实际上在构建中

请参阅SO 答案和答案,以了解更多铿锵声错误和尝试什么。

当然,您仍然应该链接到 libz:

而不是链接到 libz.1.dylib 您需要链接到 libz.dylib

从链接器设置中删除 libz.1.dylib 的条目并手动添加 libz.dylib

在此处输入图像描述

于 2012-05-08T10:57:46.403 回答