尝试从UIViewController派生的类继承时出错

时间:2013-08-22 14:38:55

标签: ios objective-c

我通过继承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)

当我尝试在小型测试应用程序中执行此操作时,一切正常。

1 个答案:

答案 0 :(得分:0)

Targets -> Build Phases -> Compile Sources中添加 BaseVC.m 。这应该可以解决问题。