title: QT undefined reference errors when trying to compile
body: <p>I added a class IcecastServer to my QT-project, added the header-file to the pro file and added some code. Everytime I compile it the following errors occur:</p>
  
  <blockquote>
    <p>release/icecastserver.o:icecastserver.cpp:(.text+0x39): undefined reference to <code>_imp___ZN10QTcpServerC1EP7QObject'
    release/icecastserver.o:icecastserver.cpp:(.text+0x50): undefined reference to</code><em>imp</em><strong>ZN12QHostAddressC1ENS_14SpecialAddressE'
    release/icecastserver.o:icecastserver.cpp:(.text+0x68): undefined reference to <code>_imp___ZN10QTcpServer6listenERK12QHostAddresst'
    release/icecastserver.o:icecastserver.cpp:(.text+0x73): undefined reference to</code>_imp</strong>_ZN12QHostAddressD1Ev'
    release/icecastserver.o:icecastserver.cpp:(.text+0x9d): undefined reference to <code>_imp___ZNK10QTcpServer11errorStringEv'
    release/icecastserver.o:icecastserver.cpp:(.text+0x3d4): undefined reference to</code><em>imp</em><strong>ZN12QHostAddressD1Ev'
    release/icecastserver.o:icecastserver.cpp:(.text+0x4bd): undefined reference to <code>_imp___ZN10QTcpServerC1EP7QObject'
    release/icecastserver.o:icecastserver.cpp:(.text+0x4d4): undefined reference to</code>_imp</strong>_ZN12QHostAddressC1ENS_14SpecialAddressE'
    release/icecastserver.o:icecastserver.cpp:(.text+0x4ec): undefined reference to <code>_imp___ZN10QTcpServer6listenERK12QHostAddresst'
    release/icecastserver.o:icecastserver.cpp:(.text+0x4f7): undefined reference to</code><em>imp</em><strong>ZN12QHostAddressD1Ev'
    release/icecastserver.o:icecastserver.cpp:(.text+0x521): undefined reference to <code>_imp___ZNK10QTcpServer11errorStringEv'
    release/icecastserver.o:icecastserver.cpp:(.text+0x858): undefined reference to</code>_imp</strong>_ZN12QHostAddressD1Ev'</p>
  </blockquote>
  
  <p><strong>What am I doing wrong?</strong></p>
  
  <p>This is the header-file:</p>
  
  <pre><code>#ifndef ICECASTSERVER_H
  #define ICECASTSERVER_H
  
  #include &lt;QObject&gt;
  
  QT_BEGIN_NAMESPACE
  class QTcpServer;
  QT_END_NAMESPACE
  
  class IcecastServer : public QObject
  {
      Q_OBJECT
  public:
      explicit IcecastServer(QObject *parent = 0);
  
  signals:
  
  public slots:
  
  private:
      QTcpServer *tcpServer;
  };
  
  #endif // ICECASTSERVER_H
  </code></pre>
  
  <p>This is the source-file:</p>
  
  <pre><code>#include "icecastserver.h"
  #include "QDebug"
  #include &lt;QtNetwork/QTcpServer&gt;
  #include &lt;QtGui&gt;
  
  IcecastServer::IcecastServer(QObject *parent) :
      QObject(parent)
  {
  
      tcpServer = new QTcpServer(this);
      //tcpServer-&gt;listen(QHostAddress::Any,8000);
  
      if (!tcpServer-&gt;listen()){
          QMessageBox::critical(NULL, tr("Fortune Server"), tr("Unable to start the server: %1.").arg(tcpServer-&gt;errorString()));
  
           return;
      }
  
  }
  </code></pre>