title: Linker error when compiling Qt GUI with own library
body: <p>I tried to use include an own library in my Qt application. </p>
  
  <p>The problem is that when I compile the application I get the following Linker-error:</p>
  
  <pre><code>MyTestLib_debug.lib(MyTestLib_debug.dll) : error LNK2005: "public: __thiscall std::_String_val&lt;struct std::_Simple_types&lt;char&gt; &gt;::_String_val&lt;struct std::_Simple_types&lt;char&gt; &gt;(void)" (??0?$_String_val@U?$_Simple_types@D@std@@@std@@QAE@XZ) already defined in moc_mainwindow.obj
  MyTestLib_debug.lib(MyTestLib_debug.dll) : error LNK2005: "public: char * __thiscall std::_String_val&lt;struct std::_Simple_types&lt;char&gt; &gt;::_Myptr(void)" (?_Myptr@?$_String_val@U?$_Simple_types@D@std@@@std@@QAEPADXZ) already defined in moc_mainwindow.obj
  MyTestLib_debug.lib(MyTestLib_debug.dll) : error LNK2005: "public: char const * __thiscall std::_String_val&lt;struct std::_Simple_types&lt;char&gt; &gt;::_Myptr(void)const " (?_Myptr@?$_String_val@U?$_Simple_types@D@std@@@std@@QBEPBDXZ) already defined in moc_mainwindow.obj
  MyTestLib_debug.lib(MyTestLib_debug.dll) : error LNK2005: "public: __thiscall std::_String_val&lt;struct std::_Simple_types&lt;char&gt; &gt;::~_String_val&lt;struct std::_Simple_types&lt;char&gt; &gt;(void)" (??1?$_String_val@U?$_Simple_types@D@std@@@std@@QAE@XZ) already defined in moc_mainwindow.obj
  debug\qtQT.exe : fatal error LNK1169: one or more multiply defined symbols found
  </code></pre>
  
  <p>I compile using Visual Studio 2013 32 Bit and I have Qt 5.3.2 using Qt Creator 3.2.1. 
  This problem only occurs when I add a widget to the Qt application. I have tried various MSVC linker options without success. Most notably I have tried these <code>/MT</code> and <code>/MD</code> options. A problem there is that my libary uses other libraries for which I do not know how they were compiled.</p>
  
  <p>Any ideas on how to fix this?</p>
  
  <p>EDIT:
  As requested here is the mainwindow.h. It is the default header which Qt creator creates when you make a new main window (I just deleted the empty lines to save some space on SO).</p>
  
  <pre><code>#ifndef MAINWINDOW_H
  #define MAINWINDOW_H
  #include &lt;QMainWindow&gt;
  namespace Ui {
  class MainWindow;
  }
  class MainWindow : public QMainWindow
  {
      Q_OBJECT
  public:
      explicit MainWindow(QWidget *parent = 0);
      ~MainWindow();
  private:
      Ui::MainWindow *ui;
  };
  #endif // MAINWINDOW_H
  </code></pre>