清洁后"libtool failed with exit code 1"



我正在从事一个项目,一切顺利,直到我决定清洁项目为止。

仅在我在模拟器上运行应用程序时出现以下错误(在真实设备上正常工作):

Libtool /Users/Yaman/Library/Developer/Xcode/DerivedData/Homeless-gujyzhsiwenufvedlinbbtrizcpd/Build/Products/Debug-iphonesimulator/libShareKit.a normal i386
    cd "/Users/Yaman/Documents/iOS - App à vendre/Homeless/Submodules/ShareKit"
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -L/Users/Yaman/Library/Developer/Xcode/DerivedData/Homeless-gujyzhsiwenufvedlinbbtrizcpd/Build/Products/Debug-iphonesimulator -filelist "/Users/Yaman/Library/Developer/Xcode/DerivedData/Homeless-gujyzhsiwenufvedlinbbtrizcpd/Build/Intermediates/ShareKit.build/Debug-iphonesimulator/Static Library.build/Objects-normal/i386/ShareKit.LinkFileList" -ObjC -all_load -lCopy -lDelicious -lDiigo -lEmail "-lEvernote SDK" -lEvernote -lFacebook "-lFlickr SDK" -lFlickr -lFoursquareV2 "-lGoogle Reader" -lInstagram -lInstapaper -lJSONKit -lKippt -lLinkedIn -lLogout -lOAuth "-lOpen in Safari" -lPinboard -lPrint -lReachability "-lRead It Later" "-lSave to Album" -lShareKitCore "-lSina Weibo" -lSSKeyChain "-lText Message" -lTumblr -lTwitter -lVKontakte -o /Users/Yaman/Library/Developer/Xcode/DerivedData/Homeless-gujyzhsiwenufvedlinbbtrizcpd/Build/Products/Debug-iphonesimulator/libShareKit.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified, -all_load invalid
/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: -lReachability
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lReachability 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

直接从终端运行命令 xcodebuild时,我遇到了这些错误:

** BUILD FAILED **

The following build commands failed:
    Libtool "build/ShareKit.build/Release-iphoneos/Static Library.build/Objects-normal/armv7/libShareKit.a" normal armv7
    Libtool "build/ShareKit.build/Release-iphoneos/Static Library.build/Objects-normal/armv7s/libShareKit.a" normal armv7s
(2 failures)

有人可以弄清楚这里发生了什么?

我刚刚遇到了这个错误。该项目运行良好,您添加了一个新的lib和bam,构建失败。

我的情况,Xcode5在我的header search paths值周围添加了一些特殊的"

这样:

"$(SRCROOT)/myproject/Libraries/lib"

很难找出答案,但是当花费几个小时来查找问题的位置时,我终于试图更改为

$(SRCROOT)/myproject/Libraries/lib

构建成功又回来了...谢谢Xcode!

第一个错误注释说,汇编ShareKit失败了,因为Reachability缺少。我建议您检查编译环境具有库的最新(或兼容)版本。

这就是为什么丢失了最后一个错误注释中提到的libShareKit.a并编译您的应用程序失败的原因。尝试单独编译ShareKit,完成后,再试一次。

相关内容

  • 没有找到相关文章

最新更新