尝试归档我的项目时出现 Apple Mach-O Librarian 错误。
我有一个链接到 FDLibrary 的 Xcode 项目。它是一个包含在同一工作区中的静态库。FDLibrary 链接到 SDLibrary。另一个静态库也包含在工作区中。
我知道拥有多个静态库是非常规的,但是 SDLibrary 包含多个应用程序的许多通用代码,而 FDLibrary 包含许多构建在 SDLibrary 上的通用代码,只有少数应用程序需要。基本上,FDLibrary 包含许多特定的接口模板,而 SDLibrary 几乎是所有数据结构和对象类型。
构建和运行到设备完全正常。但是我今天开始存档并遇到了这个错误。
欢迎所有提示!提前致谢!
Libtool "/Users/rpools1951/Library/Developer/Xcode/DerivedData/FunDecks-fqrkiylcrromdnbuuyxoyjotckal/Build/Intermediates/ArchiveIntermediates/Irregular Verbs/IntermediateBuildFilesPath/FDLibrary.build/Release-iphoneos/FDLibrary.build/Objects-normal/armv7s/libFDLibrary.a" normal armv7s
cd /Users/rpools1951/Projects/Workspaces/FDLibrary
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only armv7s -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk "-L/Users/rpools1951/Library/Developer/Xcode/DerivedData/FunDecks-fqrkiylcrromdnbuuyxoyjotckal/Build/Intermediates/ArchiveIntermediates/Irregular Verbs/BuildProductsPath/Release-iphoneos" -LSDLibrary -filelist "/Users/rpools1951/Library/Developer/Xcode/DerivedData/FunDecks-fqrkiylcrromdnbuuyxoyjotckal/Build/Intermediates/ArchiveIntermediates/Irregular Verbs/IntermediateBuildFilesPath/FDLibrary.build/Release-iphoneos/FDLibrary.build/Objects-normal/armv7s/FDLibrary.LinkFileList" -ObjC -framework UIKit -lSDLibrary -framework Foundation -o "/Users/rpools1951/Library/Developer/Xcode/DerivedData/FunDecks-fqrkiylcrromdnbuuyxoyjotckal/Build/Intermediates/ArchiveIntermediates/Irregular Verbs/IntermediateBuildFilesPath/FDLibrary.build/Release-iphoneos/FDLibrary.build/Objects-normal/armv7s/libFDLibrary.a"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lSDLibrary
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lSDLibrary is not an object file (not allowed in a library)
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1