title: qt5 undefined reference to 'QApplication::QApplication(int&, char**, int)'
body: <p>I'm trying to get a simple hello world example running, and already needed some time to figure out what includes to use
  Now I verified the include paths, the QApplication should actually be there, but it throws the above error. For clarity my code:</p>
  
  <pre><code>#include &lt;QtWidgets/QApplication&gt;
  #include &lt;QtWidgets/QPushButton&gt;
  
  int main(int argc, char *argv[])
  {
      QApplication app(argc, argv);
      QPushButton *button = new QPushButton("Hello world!");
      button-&gt;show();
      return app.exec();
  }
  </code></pre>
  
  <p>I tried compiling using first <strong>qmake -project</strong>, then <strong>qmake</strong> and finally <strong>make</strong> and then got the following errors:  </p>
  
  <pre><code>qt_hello_world.o: In function 'main':  
  undefined reference to QApplication::QApplication(int&amp;, char**, int)  
  qt_hello_world.cpp: undefined reference to QPushButton::QPushButton(QString const&amp;, QWidget*)
  qt_hello_world.cpp: undefined reference to QWidget::show()  
  qt_hello_world.cpp: undefined reference to QApplication::exec()  
  qt_hello_world.cpp: undefined reference to QApplication::~QApplication()
  qt_hello_world.cpp: undefined reference to QApplication::~QApplication()
  </code></pre>
  
  <p>The Makefile created by qmake contains the correct include path to the qt5 directory which contains the QtWidgets/QApplication, the QApplication file just includes the qapplication.h header that contains the actual class QApplication.</p>