title: C++ Qt Multiple Definitions
body: <p>I'm trying to create a simple GUI application (so far) in Qt with C++ using the MinGW compiler. However, the compiler is informing me that I have a <code>multiple definition of 'WiimoteScouter::WiimoteScouter(QWidget*)'</code> on <code>line 4</code> of <code>wiimotescouter.cpp</code>. I am using a check to make sure the header isn't included multiple times, but apparently it's not working, and I'm not sure why.</p>
  
  <p>Here's the header file:</p>
  
  <pre><code>#ifndef WIIMOTESCOUTER_H
  #define WIIMOTESCOUTER_H
  
  #include &lt;QWidget&gt;
  
  class QLabel;
  class QLineEdit;
  class QTextEdit;
  
  class WiimoteScouter : public QWidget
  {
      Q_OBJECT
  
  public:
      WiimoteScouter(QWidget *parent = 0);
  
  private:
      QLineEdit *eventLine;
  };
  
  #endif // WIIMOTESCOUTER_H
  </code></pre>
  
  <p>And here's the cpp file:</p>
  
  <pre><code>#include &lt;QtGui&gt;
  #include "wiimotescouter.h"
  
  WiimoteScouter::WiimoteScouter(QWidget *parent) :
      QWidget(parent)
  {
      QLabel *eventLabel = new QLabel(tr("Event:"));
      eventLine = new QLineEdit;
  
      QGridLayout *mainLayout = new QGridLayout;
      mainLayout-&gt;addWidget(eventLabel, 0, 0);
      mainLayout-&gt;addWidget(eventLine, 0, 1);
  
      setLayout(mainLayout);
      setWindowTitle(tr("Wiimote Alliance Scouter"));
  }
  </code></pre>
  
  <p>Lastly, the main.cpp:</p>
  
  <pre><code>#include &lt;QtGui&gt;
  #include "wiimotescouter.h"
  
  int main(int argc, char *argv[])
  {
      QApplication app(argc, argv);
  
      WiimoteScouter wiimoteScouter;
      wiimoteScouter.show();
  
      return app.exec();
  }
  </code></pre>