ios - 集成 iOS 和 Google Plus SDK 时出现链接器错误

标签 ios google-plus linker-errors armv7

我正在尝试使用 Google Plus SDK 在 iOS 6.1 应用程序中进行共享,并在添加 GooglePlus.framework 和 GoogleOpenSource.framework 后出现链接器错误。

仅包括框架和构建会产生以下错误:

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)

我已按照 Google guide 中的说明进行操作无济于事。
我做了以下事情:
  • 包括 SystemConfiguration.framework 和 Security.framework
  • 拖放 GooglePlus.framework 和 GoogleOpenSource.framework
    从 SDK 到我的 XCode 项目
  • 在应用程序目标的build设置中添加了 -ObjC 标志

  • 除了前面的步骤,我还尝试添加 SDK 中提供的 OpenSource 文件夹的内容,但这没有任何效果,导致初始修复后出现其他问题。

    图书馆:

    My included libraries

    完整的错误信息:
     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)
    

    我不确定我错过了什么,但任何帮助将不胜感激。

    最佳答案

    还链接在 CoreGraphics 框架中。它正在寻找 CGRectDivide 方法,它是 CoreGraphics 的一部分。

    关于ios - 集成 iOS 和 Google Plus SDK 时出现链接器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17247140/

    相关文章:

    javascript - Sencha 触摸2 : How can I add Google+ Login?

    google-plus - Google+ : Multiple +1 on same page, 不同内容

    ios - UITableView 显示,但单元格中没有任何名称

    ios - Swift 中同一 UIView 的多个动画

    ios - 在 Swift 中子类化 PFObject

    android - 客户经理刷新 token (离线访问)

    ios - 设置或删除react-native init引入的UIViewControllerBasedStatusBarAppearance键

    c++ - 什么是 undefined reference /未解析的外部符号错误,我该如何解决?

    c++ - 什么是 undefined reference /未解析的外部符号错误以及如何修复它?

    macos - 在没有 libSystem macOS 的情况下链接目标文件