c++ a missing vtable error

后端 未结 3 1799
盖世英雄少女心
盖世英雄少女心 2020-12-17 15:16

I am getting a really weird error related to missing vtable for a given class constructor and destructor. Please help me to resolve this.

Undefined symbols for archi

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-17 16:05

    Ah! Mulling over this I think I get what is happening. I'm betting that CCNode is code which belongs to somebody else.

    Any virtual functions you inherit are also virtual in the derived class... and it is common practice to make the destructor virtual... you might not realise the destructor is virtual.

    Also if you are using somebody else's header file, but forgot to link to their object file, it might cause this error, as the linker would be missing the destructor of CCNode.

提交回复
热议问题