Difference between revisions of "Talk:Development/Tutorials/Saving and loading"

Jump to: navigation, search
(Fix for undefined reference to vtable compiling error)
 
(Added the necessary line for the vtable fix)
Line 8: Line 8:
 
<code>
 
<code>
 
#include "mainwindow.moc"
 
#include "mainwindow.moc"
 +
</code>
 +
 +
Also add this line to your CMakeLists.txt near the top:
 +
<code>
 +
include (KDE4Defaults)
 
</code>
 
</code>
  

Revision as of 03:48, 16 March 2008

Compiling failed due to 'undefined reference to vtable ...'

When compiling, cmake failed during the linking process. undefined reference to `vtable for MainWindow'

Simply add the following line to the mainwindow.cpp:

  1. include "mainwindow.moc"

Also add this line to your CMakeLists.txt near the top: include (KDE4Defaults)

I don't exactly know why this happens to me, but I suspect the fact that I have not built any special environment for working on KDE4 applications (as described here.

Can someone who understands the process please add the appropriate steps to the main tutorial?


KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal