我目前被链接器错误阻止,该错误仅发生在 XCode5(XCode4 编译良好)和仅在模拟器上(普通设备编译良好)。
当我尝试编译时,我得到一个“Apple Mach-O Librarian Error”,它给了我下面的文字墙:
Libtool build/DevOnly-iphonesimulator/libCozi\ Common\ Code.a normal i386 cd /Users/jr/ios/app/iCozi setenv IPHONEOS_DEPLOYMENT_TARGET 4.3 setenv PATH "/Applications/XCode5/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.平台/开发者/usr/bin:/Applications/XCode5/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/XCode5/Xcode.app/ Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only i386 -syslibroot /Applications/XCode5/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/jr/ios/app/iCozi/build/DevOnly-iphonesimulator -L/Users/jr/ios/app/iCozi/../../ext/aiMatch/SASIA_iOS_SDK-iphonesimulator -L/Users/jr /ios/app/iCozi/../../ext/GoogleAdsSDK-iphone-v3.1/库-L/Users/jr/ios/app/iCozi/../../ext/Google\ Analytics\ SDK/库-L/Users/jr/ios/app/iCozi/../../ ext/AdMarvel_iOS_SDK_2_9_1/AdMarvelSDK -L/Users/jr/ios/app/iCozi/../../ext/libComScore-1.1107.12 -L/Users/jr/ios/app/iCozi/../../ ext/TestFlightSDK -L/Users/jr/ios/app/iCozi/../../ext/mBlox-SDK/Debug-universal -L/Users/jr/ios/app/iCozi/../../ ext/mBlox-SDK/Release-universal -L/Users/jr/ios/app/iCozi/../../ext/FacebookSDK/FacebookSDK.framework/Versions/A -L/Users/jr/ios/app/ iCozi/../../ext/GoogleConversionTrackingSDK -L/Users/jr/ios/app/iCozi/../../ext/TapjoyAdvertiserSDK/TapjoyAdvertiserLibrary -L/Users/jr/ios/app/iCozi/.. /../ext/MobileAppTracker.framework/Versions/A -filelist /Users/jr/ios/app/iCozi/build/iCozi.build/DevOnly-iphonesimulator/Cozi\ Common\ Code.build/Objects-normal/i386/ Cozi\通用\代码。LinkFileList -all_load -ObjC -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/jr/ios/app/iCozi/build/iCozi.build/DevOnly-iphonesimulator/Cozi\ Common\ Code.build/Cozi\ Common\ Code.xcent -framework MobileAppTracker /Applications/XCode5/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/usr/lib/libz.dylib -framework Foundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework Security -framework MobileCoreServices -framework CFNetwork -framework SystemConfiguration -weak_framework MessageUI -framework QuartzCore /Users/jr/ios/ext/three20/Build/Products/Release-iphonesimulator/libThree20.a /Users/jr/ios /ext/three20/Build/Products/Release-iphonesimulator/libThree20UI.a /Users/jr/ios/ext/three20/Build/Products/Release-iphonesimulator/libThree20UINavigator.a /Users/jr/ios/ext/three20/Build/Products/Release-iphonesimulator/libThree20UICommon.a /Users/jr/ ios/ext/three20/Build/Products/Release-iphonesimulator/libThree20Style.a /Users/jr/ios/ext/three20/Build/Products/Release-iphonesimulator/libThree20Network.a /Users/jr/ios/ext/three20/ Build/Products/Release-iphonesimulator/libThree20Core.a -framework CoreLocation -weak_framework MediaPlayer -weak_framework iAd -framework AVFoundation -framework AudioToolbox -lGoogleAnalytics /Applications/XCode5/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs /iPhoneSimulator7.0.sdk/usr/lib/libsqlite3.0.dylib -weak_framework EventKit -weak_framework EventKitUI -lTestFlight -framework comScore -framework MDS-SDK-PhoneGap -lMDSCore -framework FacebookSDK -lGoogleConversionTracking /Users/jr/ios/ext/TapjoyAdvertiserSDK/TapjoyAdvertiserLibrary/TapjoyAdvertiserLibrary.a /Users/jr/ios/ext /FacebookSDK/FacebookSDK.framework/Versions/A/FacebookSDK /Users/jr/ios/ext/MobileAppTracker.framework/Versions/A/MobileAppTracker -o /Users/jr/ios/app/iCozi/build/DevOnly-iphonesimulator/libCozi \ Common\ Code.a框架/版本/A/MobileAppTracker -o /Users/jr/ios/app/iCozi/build/DevOnly-iphonesimulator/libCozi\ Common\ Code.a框架/版本/A/MobileAppTracker -o /Users/jr/ios/app/iCozi/build/DevOnly-iphonesimulator/libCozi\ Common\ Code.a
/Applications/XCode5/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool:未知选项字符“X”在:-Xlinker 用法:/Applications/XCode5/Xcode.app/Contents/Developer/ Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] 用法:/Applications/XCode5/Xcode.app /Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name ] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table ] [-seg_addr_table_filename ] [-all_load] [-noall_load] 命令 /Applications/XCode5 /Xcode.app/Contents/Developer/Toolchains/XcodeDefault。xctoolchain/usr/bin/libtool 失败,退出代码为 1
问题的根源似乎是“-Xlinker 中的未知选项字符‘X’”,但谷歌并没有为该错误提供太多帮助:https ://www.google.com/search?q=%22% 60X%27+in%3A+Xlinker%22
“XLinker”在上面的混乱中出现了四次(“...... -all_load -ObjC -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/jr/ios/app/iCozi/build/iCozi.build/DevOnly- iphonesimulator/Cozi\Common\Code.build/Cozi\Common\Code.xcent...")
只是为了笑,我尝试从“Cozi Common Code”目标名称中删除空格,但这并没有帮助。
同样,这在 XCode4 模拟器上编译得很好,在 XCode5 中编译得很好,可以在物理设备上运行,包括 iPod 和 iPad,但是 XCode5 中的每个模拟器都有这个问题(iPhone/iPod/iPad,普通和视网膜,在 iOS5/iOS6/iOS7 上)。
我真的很感谢任何可以帮助我了解这一点的人。谢谢!