FBSDKLoginManager: undefined symbols for architecture x86_64 + linker command failed with exit code 1

浪尽此生 提交于 2019-12-06 20:49:16

问题


I just upgraded Facebook iOS SDK to v.4.0.1 and I got these errors:

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

I already tried to change linkers: with -all_load I get the same error, while with -force_load it becomes "ld: file not found: -fobjc-arc". Any solutions?


回答1:


I ran into the same problem. If you're adding Facebook Login to your app (which I presume you are) you also need to drag the FBSDKLoginKit.framework file into your Xcode project in addition to the FBSDKCoreKit.framework file.

The current instructions on Facebook's SDK Getting Started page forget to mention this. In version < 4 of the SDK, there was just one file to drag in to your project.



来源:https://stackoverflow.com/questions/29546466/fbsdkloginmanager-undefined-symbols-for-architecture-x86-64-linker-command-fa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!