title: Building QT for msvc2015 - and get working projects?
body: <p>There already is a quite related <a href="https://stackoverflow.com/questions/32894097/how-do-i-use-qt-in-my-visual-studio-2015-projects?answertab=votes#tab-top">question (rq)</a> here, but it is not specialized enough and my reputation is not high enough to ask for more advice in the comments ... yet, time is running and I've got to get somewhere.
  Once the original question is answered, this one can and should be deleted.</p>
  
  <p><strong>What I want:</strong> Working in Visual Studio 2015, using the qt-library. That's it.</p>
  
  <p><strong>What I did:</strong></p>
  
  <ul>
  <li>Install vs2015, works</li>
  <li>Download the qt5.5.0 source, built it following the <a href="https://stackoverflow.com/questions/32894097/how-do-i-use-qt-in-my-visual-studio-2015-projects?answertab=votes#tab-top">(rq)</a> instruction using <a href="https://wiki.qt.io/Jom" rel="nofollow noreferrer">jom</a> (nmake worked the same, just was slower)</li>
  <li>Install the qt package extension for vs2015, also following <a href="https://stackoverflow.com/questions/32894097/how-do-i-use-qt-in-my-visual-studio-2015-projects?answertab=votes#tab-top">(rq)</a></li>
  </ul>
  
  <p>The first error: The building-process didn't create any mkspecs, so i wasn't able to set the directory in the QT-options in visual studio: "This QT version uses an unsupported makefile generator (used:, supported: MSVN.NET, MSBUILD)"</p>
  
  <ul>
  <li>I tried to hack that by replacing it with the mkspec-folder of an installed version to I was able to select the qtbase-folder in the Qt Options.</li>
  <li>Played around with the library-directories, the include-directories and the additional-dependencies of the VS-Project. No matter what I did, the include-files where not found.</li>
  </ul>
  
  <p>As this didn't work out, I installed qt 5.5.0 mingw492_32 with the installer. Using that I was able to create a new project with the QTCreator. It compiled in the QTCreator. After that I executed</p>
  
  <pre><code>qmake -platform win32-msvc2015 -tp vs
  </code></pre>
  
  <p>to convert the project into a Visual-Studio-project, while qmake was the executable from the previously BUILT version, not the installed one, the include-files where still not found in visual studio.</p>
  
  <p>What am I doing wrong? The library-directories, the include-directories and the additional-dependencies look fine to me in the converted project.</p>
  
  <hr>
  
  <p><strong>EDIT 1:</strong>
  I followed the <a href="https://stackoverflow.com/questions/14932315/how-to-compile-qt-5-under-windows-or-linux-32-or-64-bit-static-or-dynamic-on-v">walkthrough</a> and everything built successfully. Yet, the mkspecs-folder is still empty. Creating a Qt-Widget-application with the Qt Creator endts up in a crashing app (no changes were made to the default code):</p>
  
  <pre><code>Second Chance Assertion Failed: File minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp, Line 980
  </code></pre>
  
  <p>Calling</p>
  
  <pre><code>qmake -platform win32-msvc2015 -tp vs
  </code></pre>
  
  <p>also isn't successfull:</p>
  
  <pre><code>qmake -platform win32-msvc2015 -tp vs
  WARNING: Unable to generate output for: D:/_Daten/_Studium/Bachelor-Thesis/Visual-Studio/VISAR-FSA/GuiTest/Makefile.Debug [TEMPLATE vsapp]
  WARNING: Unable to generate output for: D:/_Daten/_Studium/Bachelor-Thesis/Visual-Studio/VISAR-FSA/GuiTest/Makefile.Release [TEMPLATE vsapp]
  </code></pre>
  
  <hr>
  
  <p><strong>EDIT 2:</strong></p>
  
  <p>Concerning the mkspecs: Turns out I had to call both:</p>
  
  <pre><code>jom -j 8
  jom install
  </code></pre>
  
  <p>Now all mkspecs are created. The official documentation made me think that the second one only was an option for the build when a destination path was set.
  Yet, a freshly created Qt Widget Application in Qt Creator, with the built and installed QT-version and the correct compiler, still won't compile. A LNK2019 occures in [qtmain.lib(qtmain_win.obj)], telling me that there is a link to a symbol "__imp__CommandLineToArgvW@8" in function "_WinMain@16", that was not resolved.</p>