我有一个iOS静态库无法构建。它使用cocoapods来管理许多依赖项,同时也是一个pod。
有趣的是,当该库作为pod在客户端项目中使用时,一切都可以编译。
这里是我的错误输出:
Libtool /Users/Bob/Library/Developer/Xcode/DerivedData/MyLibrary-fxukfghqxapkcqcnjjhmhecxahhg/Build/Intermediates/MyLibrary.build/Debug-iphoneos/MyLibrary.build/Objects-normal/armv7/libMyLibrary.a normal armv7
cd /Users/Bob/Projects/MyLibrary
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:/usr/local/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only armv7 -syslibroot /Users/Bob/Projects/Xcode\ SDKs/iPhoneOS6.1.sdk -L/Users/Bob/Library/Developer/Xcode/DerivedData/MyLibrary-fxukfghqxapkcqcnjjhmhecxahhg/Build/Products/Debug-iphoneos -filelist /Users/Bob/Library/Developer/Xcode/DerivedData/MyLibrary-fxukfghqxapkcqcnjjhmhecxahhg/Build/Intermediates/MyLibrary.build/Debug-iphoneos/MyLibrary.build/Objects-normal/armv7/MyLibrary.LinkFileList -ObjC -framework SystemConfiguration -framework Security -framework CoreGraphics -framework CoreText -framework CoreLocation -framework UIKit -framework QuartzCore -framework Foundation -lPods -o /Users/Bob/Library/Developer/Xcode/DerivedData/MyLibrary-fxukfghqxapkcqcnjjhmhecxahhg/Build/Intermediates/MyLibrary.build/Debug-iphoneos/MyLibrary.build/Objects-normal/armv7/libMyLibrary.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: -lPods
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods 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
我能做什么/需要提供哪些其他信息?
关于IT技术的翻译内容,请提供具体要求。请注意,保留HTML标记。
libPods-mytarget.a
... 假设你的 Podfile 中有target 'mytarget' do
(如果有target 'myproject'
将掩盖 Xcode 项目和目标之间的区别)。 - tboyce12