【发布时间】:2015-10-20 11:39:34
【问题描述】:
我无法解决以下错误。我用过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 个目录未找到。您是否尝试过使用 -v 选项运行链接步骤?是否有任何 C++ 代码或库(在这种情况下您应该使用 clang++ 链接)
-
您是否在项目设置 -> 构建阶段 -> 将二进制文件与库部分链接到您的项目?
-
@sammy - 有一个用 c++ 编写的 libaray
标签: ios frameworks x86-64 digit