问题描述
我收到以下错误:
Undefined symbols:
"_OBJC_CLASS_$_SurveyDelegate", referenced from:
objc-class-ref-to-SurveyDelegate in Menus.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
该错误是由删除SurveyDelegate引起的,并且在我删除尝试使用超级委托的代码时已修复.为什么没有给出正常的编译错误?我已经尝试清理项目了吗?实际上,这也让我在其他地方声明了SurveyDelegate
,并且此错误并未给出链接器或编译器错误.
The error was caused by removing SurveyDelegate and was fixed when I removed the code that tried to use a survery delegate. Why isn't it giving normal compile error? I already tried cleaning the project? In fact, it also let me declare a SurveyDelegate
elsewhere and this error wasn't giving either a linker or compiler error.
其他问题
Objective c id返回了1个退出状态-相同的名称,但问题不同
Objective c id returned 1 exit status - same name, but different problem
推荐答案
从项目中删除SurveyDelegate的文件.在Finder中检查项目目录中是否有SurveyDelegate文件.删除它们,并在必要时在XCode中重新创建.不要忘了清洁(Cmd + Shift + K).
Remove files of SurveyDelegate from project. Check the project directory in Finder for SurveyDelegate files. Remove them and recreate in XCode if necessary. Don't forget about cleaning (Cmd + Shift + K).
这篇关于找不到符号. Collect2:ID返回了1个退出状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!