title: LNK2019 unresolved External Symbol for a QObject
body: <p>I'm getting the following errors when building with QMake:</p>
  <blockquote>
  <ul>
  <li><p>LNK2019: unresolved external symbol &quot;public: void __cdecl TimerTodo::notify(class TodoBaseTask *)&quot; (?notify@TimerTodo@@QEAAXPEAVTodoBaseTask@@@Z) referenced in function &quot;private: void __cdecl TimerTodo::timerOver(void)&quot; (?timerOver@TimerTodo@@AEAAXXZ)</p>
  </li>
  <li><p>LNK2019: unresolved external symbol &quot;public: void __cdecl TimerTodo::hasNotified(class TimerTodo *)&quot; (?hasNotified@TimerTodo@@QEAAXPEAV1@@Z) referenced in function &quot;private: void __cdecl TimerTodo::timerOver(void)&quot; (?timerOver@TimerTodo@@AEAAXXZ)</p>
  </li>
  <li><p>LNK1120: 2 unresolved externals</p>
  </li>
  </ul>
  </blockquote>
  <p>This is my header:</p>
  <pre><code>#ifndef TIMERTODO_H
  #define TIMERTODO_H
  
  #include &lt;QTimer&gt;
  
  class TodoBaseTask;
  
  class TimerTodo : public QTimer
  {
  public:
      TimerTodo(TodoBaseTask *timer);
      void StartTimer();
  private slots:
      void timerOver();
  signals:
      void notify(TodoBaseTask *todo);
      void hasNotified(TimerTodo *timer);
  private:
      TodoBaseTask *m_todo;
  };
  
  #endif // TIMERTODO_H
  </code></pre>
  <p>And this is my source:</p>
  <pre><code>#include &quot;timertodo.h&quot;
  #include &quot;todobasetask.h&quot;
  
  TimerTodo::TimerTodo(TodoBaseTask *todo)
  {
      m_todo = todo;
      connect(this, SIGNAL(timeout()), this, SLOT(timerOver()));
  }
  
  void TimerTodo::StartTimer()
  {
      QDateTime nextNotify = m_todo-&gt;getDeadLine().addDays(-1);
      this-&gt;start(QDateTime::currentDateTime().msecsTo(nextNotify));
  }
  
  void TimerTodo::timerOver()
  {
      emit notify(m_todo);
      emit hasNotified(this);
  }
  </code></pre>
  <p>How to fix it?</p>