2

我正在做一个项目,一切都很顺利,直到我决定清理我的项目。

仅当我在模拟器上运行我的应用程序时才会出现以下错误(在真实设备上运行良好):

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)

有人能弄清楚这里发生了什么吗?

4

2 回答 2

5

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

我的情况是,Xcode5\"在我的header search paths价值观周围添加了一些特别的东西。

像那样 :

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

几乎不可能找到,但是在花费数小时寻找问题所在时,我终于尝试更改为

$(SRCROOT)/myproject/Libraries/lib

并且构建成功回来了......感谢Xcode!

于 2013-12-01T23:38:39.697 回答
3

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

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

于 2013-01-22T08:21:15.227 回答