![]() Registered Member ![]()
|
i'm trying to write some code using qt (and qt creator but not necessarily)
whenever i use Q_OBJECT i get "undefined reference to `vtable". after some searching i found out that usually occurs when the source file does not get "moc-ed". but i tried removing the project file and the makefile, and manually running qmake -project and then qmake and the problem still occurs. i also tried building some sample code from a tutorial which worked before an os reinstall and this also fails. does anybody have any idea as to why this is happening? |
![]() Registered Member ![]()
|
well i just realized that qmake does not do anything unless the class declarations are in separate .h files ... so now it works
![]() |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]