簡體   English   中英

歸檔iOS項目的問題:找不到libz.dylib

[英]Issues with archiving iOS project: libz.dylib not found

從(舊版)iOS項目進行存檔時出現問題。 歸檔時出現以下錯誤:

Libtool /Users/appcell/Library/Developer/Xcode/DerivedData/elho-ctuevlyyxtyssvblxkqezbfgdtyq/Build/Intermediates/ArchiveIntermediates/Elho/IntermediateBuildFilesPath/PSPDFKit-lib.build/Release-iphoneos/PSPDFKit.build/Objects-normal/armv7/libPSPDFKit.a normal armv7
cd /Users/appcell/Documents/Projects/Elho/Libraries/PSPDFKit
export IPHONEOS_DEPLOYMENT_TARGET=5.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only armv7 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -L/Users/appcell/Library/Developer/Xcode/DerivedData/elho-ctuevlyyxtyssvblxkqezbfgdtyq/Build/Intermediates/ArchiveIntermediates/Elho/BuildProductsPath/Release-iphoneos -filelist /Users/appcell/Library/Developer/Xcode/DerivedData/elho-ctuevlyyxtyssvblxkqezbfgdtyq/Build/Intermediates/ArchiveIntermediates/Elho/IntermediateBuildFilesPath/PSPDFKit-lib.build/Release-iphoneos/PSPDFKit.build/Objects-normal/armv7/PSPDFKit.LinkFileList /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libz.dylib -framework AssetsLibrary -framework CoreMedia -framework AVFoundation -framework ImageIO -framework MediaPlayer -framework CoreText -framework CoreGraphics -weak_framework UIKit -framework MessageUI -framework QuartzCore -framework Foundation -o /Users/appcell/Library/Developer/Xcode/DerivedData/elho-ctuevlyyxtyssvblxkqezbfgdtyq/Build/Intermediates/ArchiveIntermediates/Elho/IntermediateBuildFilesPath/PSPDFKit-lib.build/Release-iphoneos/PSPDFKit.build/Objects-normal/armv7/libPSPDFKit.a

error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libz.dylib (No such file or directory)

當我從/usr/lib/libz.dylib文件創建一個鏈接到/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib (使用過去工作),現在出現以下錯誤:

ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libz.dylib, missing required architecture armv7 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libz.dylib (2 slices)
Undefined symbols for architecture armv7:
"_deflateInit_", referenced from:
  -[NSData(PSPDFCompression) pspdf_zlibDeflate] in libPSPDFKit.a(NSData+PSPDFCompression.o)
"_deflate", referenced from:
  -[ASIDataCompressor compressBytes:length:error:shouldFinish:] in ASIDataCompressor.o
  -[NSData(PSPDFCompression) pspdf_zlibDeflate] in libPSPDFKit.a(NSData+PSPDFCompression.o)
"_deflateInit2_", referenced from:
  -[ASIDataCompressor setupStream] in ASIDataCompressor.o
"_inflate", referenced from:
  _unzReadCurrentFile in unzip.o
  -[ASIDataDecompressor uncompressBytes:length:error:] in ASIDataDecompressor.o
  -[NSData(PSPDFCompression) pspdf_zlibInflate] in libPSPDFKit.a(NSData+PSPDFCompression.o)
"_get_crc_table", referenced from:
  _unzOpenCurrentFile3 in unzip.o
"_inflateEnd", referenced from:
  _unzCloseCurrentFile in unzip.o
  -[ASIDataDecompressor closeStream] in ASIDataDecompressor.o
  -[NSData(PSPDFCompression) pspdf_zlibInflate] in libPSPDFKit.a(NSData+PSPDFCompression.o)
"_crc32", referenced from:
  _unzReadCurrentFile in unzip.o
"_inflateInit_", referenced from:
  -[NSData(PSPDFCompression) pspdf_zlibInflate] in libPSPDFKit.a(NSData+PSPDFCompression.o)
"_deflateEnd", referenced from:
  -[ASIDataCompressor closeStream] in ASIDataCompressor.o
  -[NSData(PSPDFCompression) pspdf_zlibDeflate] in libPSPDFKit.a(NSData+PSPDFCompression.o)
"_inflateInit2_", referenced from:
  _unzOpenCurrentFile3 in unzip.o
  -[ASIDataDecompressor setupStream] in ASIDataDecompressor.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

有沒有人遇到過同樣的問題?

PSPDFKit的創始人在這里。 我們的PDF SDK使用libz,因此要么鏈接libz.dylib (已在以后的Xcode版本libz.tbd其重命名為libz.tbd ),要么添加了鏈接器標志-lz ,而als可以解決這個問題。

如果您將SDK更新到最新版本,由於我們使用的動態框架已經知道其需要哪些依賴關系,因此所有這些都會自動發生。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM