Undefined reference to vtable

前端 未结 16 2112
死守一世寂寞
死守一世寂寞 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:09

    For what it is worth, forgetting a body on a virtual destructor generates the following:

    undefined reference to `vtable for CYourClass'.

    I am adding a note because the error message is deceptive. (This was with gcc version 4.6.3.)

提交回复
热议问题