[英]clang: error: linker command failed with exit code 1
I just opened a project i havent worked for in a couple months, and just tried to compile and run it. 我刚刚打开了一个我几个月没有工作过的项目,然后尝试编译并运行它。
I immediately got: 我立即得到:
Undefined symbols for architecture i386:
"l_OBJC_PROTOCOL_$_VideoOverviewControllerDelegate", referenced from:
l_OBJC_CLASS_PROTOCOLS_$_FeaturedViewController in FeaturedViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1
and no amount of cleaning helped this error. 而且没有大量的清洁措施可以解决此错误。 I checked the two classes referenced in the error but couldn't find any error. 我检查了错误中引用的两个类,但找不到任何错误。
I had this issue as well and finally found that i had implemented the same class two times. 我也遇到了这个问题,最终发现我已经两次实施了相同的课程。 Check our class names for duplicates or duplicate .h or .m files. 检查我们的类名称是否重复或重复的.h或.m文件。
Just be sure you didn't import a .m in your file. 只要确保您没有在文件中导入.m即可。
#import "myFile.m"
will give you this error... just fix it with a 会给你这个错误...只是用一个
#import "myFile.h"
Probably you don't have VideoOverviewControllerDelegate (i don't know, what it is) in linked frameworks. 可能您在链接框架中没有VideoOverviewControllerDelegate(我不知道它是什么)。 How to add framework to project . 如何为项目添加框架 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.