ParseCrash报告iOS链接器错误

时间:2015-03-27 21:48:08

标签: ios linker-errors

我试图启用解析崩溃报告。但是,编译时始终存在链接器错误。我在其他线程中尝试过该方法,比如添加除libstdc ++ 6之外的libstdc ++ 6.0.9。

错误消息是:

Ld /Users/Peter/Library/Developer/Xcode/DerivedData/Foodmate-bmbrourdyfbrskdmdpojqnvszznk/Build/Products/Debug-iphonesimulator/Foodmate.app/Foodmate normal x86_64
cd /Users/Peter/Dropbox/work/foodmate/iOS/HomeMade
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export 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/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/Peter/Library/Developer/Xcode/DerivedData/Foodmate-bmbrourdyfbrskdmdpojqnvszznk/Build/Products/Debug-iphonesimulator -F/Users/Peter/Library/Developer/Xcode/DerivedData/Foodmate-bmbrourdyfbrskdmdpojqnvszznk/Build/Products/Debug-iphonesimulator -F/Users/Peter/Dropbox/work/foodmate/iOS/HomeMade -F/Users/Peter/Dropbox/work/foodmate/iOS/HomeMade/HomeMade -F/Users/Peter/Desktop/Foodmate/iOS/lib -F/Users/Peter/Dropbox/work/foodmate/iOS/HomeMade/HomeMade/ActionSheetPicker-3.0-master/ObjC-Example -F/Users/Peter/Dropbox/work/foodmate/iOS/lib -F/Users/Peter/Dropbox/work/foodmate/iOS/HomeMade/HomeMade/parse -filelist /Users/Peter/Library/Developer/Xcode/DerivedData/Foodmate-bmbrourdyfbrskdmdpojqnvszznk/Build/Intermediates/Foodmate.build/Debug-iphonesimulator/Foodmate.build/Objects-normal/x86_64/Foodmate.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -lsqlite3 -lstdc++.6 -framework ParseCrashReporting -framework StoreKit -framework CoreLocation -framework ParseFacebookUtils /Users/Peter/Library/Developer/Xcode/DerivedData/Foodmate-bmbrourdyfbrskdmdpojqnvszznk/Build/Products/Debug-iphonesimulator/libGPUImage.a -framework SystemConfiguration -framework Parse -framework ParseUI -framework Social -framework Security -framework QuartzCore -framework MobileCoreServices -lz -framework ParseFacebookUtilsV4 -framework CoreGraphics -framework CFNetwork -framework AudioToolbox -framework Accounts -framework Bolts -Xlinker -dependency_info -Xlinker /Users/Peter/Library/Developer/Xcode/DerivedData/Foodmate-bmbrourdyfbrskdmdpojqnvszznk/Build/Intermediates/Foodmate.build/Debug-iphonesimulator/Foodmate.build/Objects-normal/x86_64/Foodmate_dependency_info.dat -o /Users/Peter/Library/Developer/Xcode/DerivedData/Foodmate-bmbrourdyfbrskdmdpojqnvszznk/Build/Products/Debug-iphonesimulator/Foodmate.app/Foodmate

Undefined symbols for architecture x86_64:

"_OBJC_CLASS_$_PFDevice", referenced from:
  objc-class-ref in ParseCrashReporting(PFCrashReporter.o)

"_OBJC_CLASS_$_PFLogger", referenced from:
  objc-class-ref in ParseCrashReporting(ParseCrashReporting.o)
  objc-class-ref in ParseCrashReporting(PFCrashReporter.o)
  objc-class-ref in ParseCrashReporting(PFCrashReportingAnalytics.o)

"_OBJC_CLASS_$_PFRESTAnalyticsCommand", referenced from:
  objc-class-ref in ParseCrashReporting(PFCrashReportingAnalytics.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

4 个答案:

答案 0 :(得分:0)

这些是在另一个没有链接到应用程序的框架或静态库中吗?

  • PFDevice
  • PFLogger
  • PFRESTAnalyticsCommand

答案 1 :(得分:0)

该链接错误意味着您正在使用PFDevice,PFLogger和PFRESTAnalyticsCommand类,但您没有链接任何提供这些类的实现的目标文件,库或框架。您需要在构建时添加链接。如果使用Xcode,请选择提供类的框架,并选中该框以将其添加到目标(或将其拖到链接阶段)。你已经链接它,消息也可能意味着你的框架没有x86_64切片。

答案 2 :(得分:0)

将最新版本Parse.framework,ParseCrashReporting.framework和Bolts.framework重新添加到您的项目中。

答案 3 :(得分:0)

我解决了这个问题。 问题实际上是由buildPath中的库路径不正确引起的。所以xcode首先搜索路径并使用Parse.framework的订单版本