Undefined reference to vtable

前端 未结 16 2163
死守一世寂寞
死守一世寂寞 2020-11-21 20:30

When building my C++ program, I\'m getting the error message

undefined reference to \'vtable...

What is the cause of this probl

16条回答
  •  名媛妹妹
    2020-11-21 21:07

    • Are you sure that CDasherComponent has a body for the destructor? It's definitely not here - the question is if it is in the .cc file.
    • From a style perspective, CDasherModule should explicitly define its destructor virtual.
    • It looks like CGameModule has an extra } at the end (after the }; // for the class).
    • Is CGameModule being linked against the libraries that define CDasherModule and CDasherComponent?

提交回复
热议问题