The Irish Penguin Watching Open Source unfold across Ireland

1Jul/0713

QObject, QMake and Sadness – ‘Undefined reference to vtable’

Mmmm... Bit of a longwinded title there! Basically, I could not shake off the following error recently, when writing a class Browser which inherited from QObject. Apparently, the answer is that sometimes you simply have to delete your Makefiles and regenerate them using QMake (KDevelop automatically creates Makefiles from me if none are found), in order to get over this error.

/path/to/frogface/trunk/src/browser.cpp:38:
undefined reference to `vtable for Browser'
browser.o: In function `Browser':
/path/to/frogface/trunk/src/browser.cpp:34:
undefined reference to `vtable for Browser'
/path/to/frogface/trunk/src/browser.cpp:34:
undefined reference to `vtable for Browser'
collect2: ld returned 1 exit status
gmake[1]: *** [../bin/frogface] Error 1
gmake: *** [sub-src-make_default] Error 2
*** Exited with status: 2 ***

Thanks to the patient folks on the QT mailing for the help!

Funnily enough as I write this, someone's just posted the following checklist on the #qt irc channel, which is good advice

  1. Make sure the Q_OBJECT macro is present in the definition of all QObject-derived classes
  2. Make sure you define your QObject-derived classes in your header files ONLY
  3. Make sure all of your header files are listed in your .pro file in the HEADERS= list
  4. Run qmake every time you add Q_OBJECT to one of your classes or modify your .pro file
  5. The last one is particularly important as I've made an art form out of forgetting it :)

30Apr/070

The Frogface Project Website Launched

We've tried to start this before and never quite finished it. You can check out the site at www.frogface.org. This time things went smoothly, however I had to struggle through my hangover on Saturday while I polished off the final details. A big kudos to Veedles who did a smashing job creating the images and logo for the site - and now that she is the queen of web design is gonna spruce the site up even more over the coming weeks!

Frogface logo

The Frogface project is an effort to create a user friendly scuba dive logging application which runs on any computer. It's still not ready for everyday use so us developers will have to keep beavering away for a while. Things are going well recently as I escaped my horribly busy work schedule in order to get phase 1 of the project done. Ganesh is working on getting the menu's together over the coming weeks and I'm gonna try and get my head around beautifying the user interface and making it look real pretty. As they say, "There's more than one way to skin an app!"

11Mar/072

Slaps on the Backs All Round

A big congratulations goes to Sun Microsystems, who have finally open sourced Java - under the GPL, if you don't mind. This is the move that will finally stop me criticising them so I'll shut up now. In addition, they've very kindly given me permission to use their Joint Copyright Agreement for my Frogface project (just thought I'd plug that one again!) which is ticking along nicely on www.sourceforge.net/projects/frogface

Man of the moment is Ganesh, who's managed to submit the first non-me patch to the Frogface codebase and, along with all the other Frogface developers, has demonstrated great patience as the project gets up on its feet!

Finally, a big shout goes out to Vee who's working her little socks off studying at the moment. All she's missing is the hang'n'cheese sandwiches to complete the student lifestyle - mainly cause she doesn't have the time to make them!!!