我们在xcode编译ios项目的时候,出现了如下这样的错误:
Undefined symbols for architecture x86_64:"_OBJC_CLASS_$_chatController", referenced from:objc-class-ref in groupChatController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
"_OBJC_CLASS_$_chatController", referenced from:错误问题解决:
因为我们在新建或复制chatController.m文件的时候,chatController.m未参与编译,造成与chatController类相关的引用groupChatController.o也出现了错误,这个时候我们只需要在项目target中的Build Phases ----Compile Sources里面加入chatController.m文件,并重新编译即可!