Qt Error: undefined reference to `vtable for


I was receiving this error once, when I was trying to add signals & slots to one of my classes. I figured out that Qt was having problems with moc files, and there were no moc files being generated.

To solve the problem, I specified “moc directory” in the project’s .pro file:

OBJECTS_DIR = debug/obj
MOC_DIR = debug/moc

And my problem was solved 😀

Advertisements

2 thoughts on “Qt Error: undefined reference to `vtable for

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s