xcode 架构 i386 的未定义符号“_OBJC_CLASS_$_Appirater”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8953966/
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_$_Appirater"
提问by CristiC
After adding Appirater to my iOS project, when I compile, I get the error:
将 Appirater 添加到我的 iOS 项目后,编译时出现错误:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Appirater", 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)
After searching and searching on the internet, none of the solutions found helped.
在互联网上搜索和搜索后,找到的解决方案都没有帮助。
Both my project and target are setup as:
我的项目和目标都设置为:
What should I try more?
我应该多尝试什么?
回答by Tomasz Wojtkowiak
I think, that you only added files to project, but not to target.
Click on Appirater.m
file in Project Navigator
and set checkbox near to your target name in Target membership
of File Inspector
.
我认为,您只将文件添加到项目,而不是目标。
点击Appirater.m
文件Project Navigator
和设置复选框接近你的目标名称Target membership
的File Inspector
。
回答by Codo
It seems that you haven't properly added the Appirater code to your project. Both Appirater.h
and Appirater.m
must be part of your project, and Appirater.m
must be compiled like all your other files.
您似乎没有将 Appirater 代码正确添加到您的项目中。双方Appirater.h
并Appirater.m
一定是你的项目的一部分,Appirater.m
必须像所有其他文件进行编译。
回答by Greg
You'll also get this error if you've neglected to add the CFNetwork and SystemConfiguration frameworks to your project.
如果您忽略了将 CFNetwork 和 SystemConfiguration 框架添加到您的项目,您也会收到此错误。
回答by Patrick
I just had the same problem, and fixed it.
我刚刚遇到了同样的问题,并修复了它。
The cause of my issue is I had dragged and dropped a file from other project to the current.
我的问题的原因是我将文件从其他项目拖放到当前项目中。
Of course it is working when we remove and recreate the file.
当然,当我们删除并重新创建文件时,它是有效的。