A missing vtable usually means the first non-inline virtual member function has no definition

后端 未结 2 1741
醉话见心
醉话见心 2021-01-01 20:37

I am pretty sure this question is duplicate, but my code is different here, the following is my code. It fails with a \"Undefined symbols\" error, not sure whats missing.

2条回答
  •  一整个雨季
    2021-01-01 21:15

    To help anyone else that comes this way looking for help with "NOTE: a missing vtable usually means the first non-inline virtual member function has no definition."

    In my case the error was caused by a missing = 0; at the end of the virtual definition. Make sure all the virtual definitions have = 0; at the end.

    virtual HRESULT function(int testInput) = 0;
    

    Hopefully this saves someone some time.

提交回复
热议问题