我通过继承BaseVC
类开发了一个名为UIViewController
的类。当我尝试从我的新BaseVC
类继承时,我收到此错误:
Undefined symbols for architecture armv7s:
"_OBJC_METACLASS_$_BaseVC", referenced from:
_OBJC_METACLASS_$_ClassX in ClassX.o
"_OBJC_CLASS_$_BaseVC", referenced from:
_OBJC_CLASS_$_ClassX in ClassX.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
当我尝试在小型测试应用程序中执行此操作时,一切正常。
答案 0 :(得分:0)
在Targets -> Build Phases -> Compile Sources
中添加 BaseVC.m 。这应该可以解决问题。