title: undefined reference to `vtable for MyCalss'
body: <p>I've created new project with QTCreator using <em>Empty Qt Project</em></p>
  
  <p><strong>MocTest.pro</strong></p>
  
  <pre><code>QT += core
  QT -= gui
  
  TARGET = MocTest
  CONFIG   += console
  
  TEMPLATE = app
  
  
  SOURCES += \
      main.cpp
  </code></pre>
  
  <p><strong>main.cpp</strong></p>
  
  <pre><code>#include &lt;QCoreApplication&gt;
  #include &lt;iostream&gt;
  
  class A : public QObject
  {
      Q_OBJECT
  
  public:
      A() {}
  
  public slots:
      void slotA() {std::cout&lt;&lt;"Hi!";}
  };
  
  class B : public QObject
  {
      Q_OBJECT
  
  public:
      B () {}
  
      void doB() {emit ss();}
  
  signals:
      void ss();
  };
  
  int main(int argc, char *argv[])
  {
      QCoreApplication app (argc, argv);
      A a;
      B b;
      return app.exec();
  }
  </code></pre>
  
  <p>I got errors</p>
  
  <p>D:\Test\MocTest\debug\main.o:-1: In function `ZN1AC1Ev':</p>
  
  <p>D:\Test\MocTest\main.cpp:9: error: undefined reference to `vtable for A'</p>
  
  <p>D:\Test\MocTest\main.cpp:20: error: undefined reference to `vtable for B'</p>
  
  <p>D:\Test\MocTest\main.cpp:4: error: undefined reference to `vtable for A'</p>
  
  <p>D:\Test\MocTest\main.cpp:15: error: undefined reference to `vtable for B'</p>
  
  <p>collect2.exe:-1: error: error: ld returned 1 exit status</p>