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

查看:44
本文介绍了架构 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

推荐答案

如果你的ArchitecturesValid Architectures都没有问题,你可以检查你是否添加了$(inherited) ,将在 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天全站免登陆