title: Compile QT Error
body: <p>I would like to compile <code>QT 5.9.3</code> with <code>Visual Studio 2017</code>. I was changing the the <code>QMAKE_CFLAGS_DEBUG</code> to <code>-Zi -MD</code> instead of <code>-Zi -MDd</code> in the file <code>C:\Qt\5.9.3-x86\qtbase\mkspecs\common\msvc-desktop.conf</code>.</p>
  
  <p>However, when I configure with</p>
  
  <pre><code>configure -debug -confirm-license -nomake examples -nomake tests -opensource -platform win32-msvc -prefix C:\Qt\5.9.3-x86\5.9.3-x86-install
  </code></pre>
  
  <p>and run <code>nmake</code> after that, I always get an error for unresolved external symbol <code>__imp___CrtDbgReporterW</code> like the following image shows:</p>
  
  <p><a href="https://i.stack.imgur.com/mDJgU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mDJgU.jpg" alt="Qt compiler error"></a></p>
  
  <p>I figured out that this is due to symbols that are available in Debug-mode but not available in Release-mode.
  So I added an <code>NDEBUG</code>-option following <a href="https://bugreports.qt.io/browse/QTBUG-60776%20ge%C3%A4ndert" rel="nofollow noreferrer">this post</a>. But without luck. I also tried advancing <code>QMAKE_CFLAGS_DEBUG</code> to <code>-Zi -MD -D"NDEBUG"</code>. But this yielded no luck as well.</p>
  
  <p>Can anyone give me some hints on how to fix this? I need the Debug libraries compiled with the <code>/MD</code> instead of the <code>/MDd</code> flag.</p>
  
  <p><strong>--- Edit ---</strong></p>
  
  <p>Redirecting the ouput of the VS2017 Command Prompt shows that the file <em>Debug2.cpp</em> has the link command</p>
  
  <pre><code>link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /DLL /SUBSYSTEM:WINDOWS /DEF:..\..\..\3rdparty\angle\src\libGLESv2\libGLESv2d.def /MANIFEST:embed /OUT:..\..\..\..\lib\libGLESv2d.dll @C:\Users\user\AppData\Local\Temp\nm88DB.tmp
  </code></pre>
  
  <p>which results in the <em>unresolved external symbols</em> error.</p>