xcode 架构 i386 的未定义符号:“_OBJC_CLASS_$_Facebook”,引用自:AppDelegate.o 中的 objc-class-ref
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11835699/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Undefined symbols for architecture i386: "_OBJC_CLASS_$_Facebook", referenced from: objc-class-ref in AppDelegate.o
提问by jimbob
I have no idea why this error is happening. I have imported the facebook ios sdk static library and I get that error. What could be causing it?
我不知道为什么会发生这个错误。我已导入 facebook ios sdk 静态库,但出现该错误。是什么原因造成的?
Thanks for any help guys
感谢您的帮助
Undefined symbols for architecture i386: "_OBJC_CLASS_$_Facebook", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
体系结构 i386 的未定义符号:“_OBJC_CLASS_$_Facebook”,引用自:AppDelegate.o ld 中的 objc-class-ref:未找到体系结构 i386 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -v查看调用)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Facebook", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
采纳答案by marko
The linker can't find symbols related to class Facebook.
链接器找不到与类 Facebook 相关的符号。
A good first place to look would be to check whether there is a simulator (x86) build of the SDK included in your project. Usually XCode takes care of selecting the right architecture for you, but it's possible you just have the ARMv7 version.
最好首先查看项目中是否包含 SDK 的模拟器 (x86) 版本。通常 XCode 会负责为您选择正确的架构,但您可能只有 ARMv7 版本。
Care to share the command-line for the linker with us? (you can get this by selecting the log tab in the project navigator - it's the rightmost - and then drilling down to get the command-line for each build action.)
愿意与我们分享链接器的命令行吗?(您可以通过选择项目导航器中的日志选项卡来获得它——它是最右边的——然后深入获取每个构建操作的命令行。)