我试图在iOS 6.1应用程序中使用Google Plus SDK进行共享,并在添加GooglePlus.framework和GoogleOpenSource.framework后出现链接器错误。集成iOS和Google Plus SDK时的链接器错误
仅仅包括框架和建设产生了以下错误:在Google guide发现无济于事
Undefined symbols for architecture armv7:
"_CGRectDivide", referenced from:
-[GTMOAuth2ViewControllerTouch moveWebViewFromUnderNavigationBar] in GTMOAuth2ViewControllerTouch.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我跟着指示。 我已经做了以下内容:
- 包括SystemConfiguration.framework和Security.framework
- 被拖从SDK扔下GooglePlus.framework和GoogleOpenSource.framework 到我的XCode项目
- 添加了-ObjC标志到应用程序目标的内部设置
除了前面的步骤,我还尝试添加SDK中提供的OpenSource文件夹的内容,但那在初始修复后导致了其他问题。
库:
完整的错误消息:
Ld "/Users/me/Library/Developer/Xcode/DerivedData/MyApp-asdf/Build/Intermediates/MyApp.build/
Debug-iphoneos/MyAoo.build/Objects-normal/armv7/MyApp" normal armv7
cd /Users/me/code/MyApp
setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
setenv PATH
"/Applications/Xcode.app/Contents/Developer/Platforms/
iPhoneOS.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 armv7 -isysroot
/Applications/Xcode.app/Contents/Developer/
Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
-L/Users/me/Library/Developer/Xcode/DerivedData/
MyApp-asdf/Build/Products/Debug-iphoneos
-L/Users/me/code/MyApp/MyApp
-F/Users/me/Library/Developer/Xcode/DerivedData/MyApp-asdf/Build/Products/Debug-iphoneos
-F/Users/me/code/MyApp/../../Documents/FacebookSDK -F/Users/me/code/MyApp
-F/Users/me/code/MyApp/MyApp
-filelist "/Users/me/Library/Developer/Xcode/
DerivedData/MyApp-asdf/Build/Intermediates/
MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/armv7/MyApp.LinkFileList"
-dead_strip -ObjC -lsqlite3.0 -fobjc-arc
-fobjc-link-runtime -miphoneos-version-min=6.1
-framework SystemConfiguration -framework Security
-framework CFNetwork -framework Social -framework Accounts
-framework EventKit -framework EventKitUI
-framework AVFoundation -framework MapKit
-framework Twitter -framework CoreMotion -framework CoreLocation
-lxml2 -framework QuartzCore
-framework MobileCoreServices -framework CoreData
-framework UIKit -framework Foundation
-framework Pinterest -framework GooglePlus
-framework GoogleOpenSource
-lGooglePlusUniversal -o
"/Users/me/Library/Developer/
Xcode/DerivedData/MyApp-asdf/Build/Intermediates/MyApp.build/
Debug-iphoneos/MyApp.build/Objects-normal/armv7/MyApp"
Undefined symbols for architecture armv7:
"_CGRectDivide", referenced from:
-[GTMOAuth2ViewControllerTouch moveWebViewFromUnderNavigationBar] in
GTMOAuth2ViewControllerTouch.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我不知道我错过了,但任何帮助,将不胜感激。
谢谢!这样做的工作! – ktdh