架构x86_64的未定义符号 - ld:未找到架构x86_64的符号

时间:2015-10-20 11:39:35

标签: ios frameworks x86-64 digit

我无法解决以下错误。我用过cocoapods  对于外部库/框架。

Ld /Users/MyAppapp/Library/Developer/Xcode/DerivedData/MyApp-ceyvfirzookxqtdglefjjtyixokw/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp normal x86_64
    cd /Users/MyAppapp/Documents/MyApp-ios
    export IPHONEOS_DEPLOYMENT_TARGET=7.0
    export PATH="/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode 2.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode\ 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode\ 2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -L/Users/MyAppapp/Library/Developer/Xcode/DerivedData/MyApp-ceyvfirzookxqtdglefjjtyixokw/Build/Products/Debug-iphonesimulator -L/Users/MyAppapp/Documents/MyApp-ios/Pods/Realm/core -F/Users/MyAppapp/Library/Developer/Xcode/DerivedData/MyApp-ceyvfirzookxqtdglefjjtyixokw/Build/Products/Debug-iphonesimulator -F/Users/MyAppapp/Documents/MyApp-ios/Pods/Crashlytics -F/Users/MyAppapp/Documents/MyApp-ios/Pods/Digits -F/Users/MyAppapp/Documents/MyApp-ios/Pods/Fabric -F/Users/MyAppapp/Documents/MyApp-ios/Pods/TwitterCore -F/Users/MyAppapp/Documents/MyApp-ios/Pods/TwitterKit -F/Users/MyAppapp/Documents/MyApp-ios -F/Users/MyAppapp/Documents/MyApp-ios/MyApp/Frameworks -F/Users/MyAppapp/Documents/MyApp-ios/MyApp/Frameworks/FacebookSDK -filelist /Users/MyAppapp/Library/Developer/Xcode/DerivedData/MyApp-ceyvfirzookxqtdglefjjtyixokw/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/MyApp.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=7.0 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -ObjC -lBolts -lDiskcached -lFBSDKCoreKit -lFBSDKLoginKit -lFBSDKShareKit -lImageLoader -lMBProgressHUD -lRealm -lc++ -lrealm-ios -lz -framework Accounts -framework AddressBook -framework CoreData -framework CoreGraphics -framework CoreText -framework Crashlytics -framework DigitsKit -framework Fabric -framework Foundation -framework QuartzCore -framework Security -framework Social -framework SystemConfiguration -framework TwitterCore -framework TwitterKit -framework UIKit -weak_framework Accounts -weak_framework AudioToolbox -weak_framework CoreGraphics -weak_framework CoreLocation -weak_framework Foundation -weak_framework QuartzCore -weak_framework Security -weak_framework Social -weak_framework UIKit -fobjc-arc -fobjc-link-runtime /Users/MyAppapp/Library/Developer/Xcode/DerivedData/MyApp-ceyvfirzookxqtdglefjjtyixokw/Build/Products/Debug-iphonesimulator/libMBProgressHUD.a -framework SystemConfiguration -framework QuartzCore -framework OpenGLES -lz -licucore -lc++ -framework ImageIO -framework GLKit -framework CoreText -framework CoreLocation -framework CoreData -framework AVFoundation -framework CoreGraphics -framework UIKit -framework Foundation -lPods -Xlinker -dependency_info -Xlinker /Users/MyAppapp/Library/Developer/Xcode/DerivedData/MyApp-ceyvfirzookxqtdglefjjtyixokw/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/MyApp_dependency_info.dat -o /Users/MyAppapp/Library/Developer/Xcode/DerivedData/MyApp-ceyvfirzookxqtdglefjjtyixokw/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp

ld: warning: directory not found for option '-F/Users/MyAppapp/Documents/MyApp-ios/MyApp/Frameworks'
ld: warning: directory not found for option '-F/Users/MyAppapp/Documents/MyApp-ios/MyApp/Frameworks/FacebookSDK'
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_TWTRAPIResponseValidator", referenced from:
      objc-class-ref in DigitsKit(DGTNetworkingHelper.o)
  "_OBJC_CLASS_$_TWTRGuestSessionRefreshStrategy", referenced from:
      objc-class-ref in DigitsKit(Digits.o)
  "_OBJC_CLASS_$_TWTRNetworkingPipeline", referenced from:
      objc-class-ref in DigitsKit(DGTNetworkingHelper.o)
  "_OBJC_CLASS_$_TWTRSessionStore", referenced from:
      objc-class-ref in DigitsKit(Digits.o)
  "_OBJC_CLASS_$_TWTRURLSessionDelegate", referenced from:
      objc-class-ref in DigitsKit(DGTNetworkingHelper.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

搜索并尝试了许多解决方案,例如 - 链接器错误,验证项目目录中缺少的构建设置或框架,在构建设置中更改有效体系结构,清理派生数据但无法解决问题。

在某些帖子中,我看到了#inclue#import,但在下面的错误中我没有到达。任何建议。

2 个答案:

答案 0 :(得分:0)

您错过了TwitterCore library

我是如何找到这个的:

  1. 取一个缺失的符号(_OBJC_CLASS_$_TWTRSessionStore)。
  2. 在Google上搜索TWTRSessionStore
  3. 点击上面的cocoapod网站。

答案 1 :(得分:0)

终于解决了。

在我的Podfile中,未在Digits框架旁边指定版本号。我对其进行了修改并保留了与TwitterCore相同的数字(即1.9.0)&救了它。

然后再次运行pod install。 (这次它从数字框架中获取了一些丢失的数据)

希望它有所帮助。

相关问题