每次从 CocoaPods 导入文件时,我都会收到 Apple Mach-O 链接器错误。
Undefined symbols for architecture arm64: "_OBJC_CLASS_$_FBSession", referenced from: someFile ld: symbol(s) not found for architecture arm64
对于我使用的各种 Pod,我得到了大约 12 个。
我正在尝试使用 XCode 5 为 iPhone 5S 构建。
我一直在这里尝试各种解决方案,但还没有任何一个可以工作。
如何修复此 Apple Mach-O 链接器错误?
刚刚发现另一个可能很有趣的警告,我希望这能引导我找到解决方案:
Ignoring file ~/Library/Developer/Xcode/DerivedData/SomeApp/Build/Products/Debug-iphoneos/libPods.a,
file was built for archive which is not the architecture being linked (arm64):~/Library/Developer/Xcode/DerivedData/someApp/Build/Products/Debug- iphoneos/libPods.a
file was built for archive which is not the architecture being linked
(arm64):~/Library/Developer/Xcode/DerivedData/someApp/Build/Products/Debug- iphoneos/libPods.a
如果您的 Architectures 和 Valid Architectures 都没有问题,您可以检查您是否已将$(inherited)pod 中生成的链接器标志添加到 Other Linker Flags 中,如下所示:
$(inherited)