Undefined reference to the `vtable for MainWindow 'error

Hi everyone, I work in qt and qwt, but in my program I get this error

undefined reference to `vtable for MainWindow 'error: collect2: ld returned 1 exit status

I did not understand what is the meaning of this error, can someone explain this, since, apparently, I have no error in my code

thank

+5
source share
1 answer

You do not mess with everything you need. You need to run moc in your .cpp files and add, for example. #include "moc_myfile.cpp"to endmyfile.cpp

Alternatively, you declared a virtual function (possibly a destructor) without defining it.

+4
source

All Articles