在xcode下建立 cocos2d-x工程。如果一个新建的类继承了某个委托,但是没有实现父类的纯虚函数!就好提示以下错误:
Undefined symbols for architecture i386:
"vtable for UIPersonListView", referenced from:
UIPersonListView::UIPersonListView() in UIPersonListView.o
UIPersonListView::~UIPersonListView() in UIPersonListView.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
通常情况下人们遇到这个错误会以为是构造函数没定义!但是这里其实与构造函数无关(ps:是可能有虚函数没实现,造成类不完整)