This forum has been archived. All content is frozen. Please use KDE Discuss instead.

undefined reference to `vtable

Tags: None
(comma "," separated)
ionux
Registered Member
Posts
5
Karma
0
OS

undefined reference to `vtable

Mon Nov 30, 2009 12:32 am
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?
ionux
Registered Member
Posts
5
Karma
0
OS
well i just realized that qmake does not do anything unless the class declarations are in separate .h files ... so now it works :)) thread may be closed


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]