架构arm64的未定义符号 [英] Undefined symbols for architecture arm64

查看:572
本文介绍了架构arm64的未定义符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次从CocoaPods导入文件时,我都会收到Apple Mach-O链接器错误。

I am getting a Apple Mach-O Linker Error everytime I import a file from CocoaPods.

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FBSession", referenced from: someFile
ld: symbol(s) not found for architecture arm64

对于我使用的各种Pod,我得到了大约12个。

I get about 12 of these, for the various Pods I use.

我正在尝试使用XCode 5为iPhone 5S构建。

I am trying to build for the iPhone 5S using XCode 5.

我一直在SO上尝试各种解决方案,但还没有任何解决方案可以使用。

I've been trying various solutions here on SO, but haven't got any of them to work yet.

如何修复此Apple Mach-O链接器错误?

发现了另一个可能有趣的警告,我希望这能引导我找到解决方案:

Just found another warning that might be interesting, I hope this leads me to the solution:

Ignoring file ~/Library/Developer/Xcode/DerivedData/SomeApp/Build/Products/Debug-iphoneos/libPods.a, 

文件是为存档而构建的,而不是被链接的架构 (arm64 ):〜/ Library / Developer / Xcode / DerivedData / someApp / Build / Products / Debug-iphoneos / libPods.a

推荐答案

如果体系结构有效体系结构都可以,您可以检查是否添加了 $(继承),它将在pod中添加链接器标志,添加到其他链接器标志,如下所示:

If your Architectures and Valid Architectures are all right, you may check whether you have added $(inherited) , which will add linker flags generated in pods, to Other Linker Flags as below:

这篇关于架构arm64的未定义符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆