title: Qt Windows application linker error: unresolved symbol _WinMain
body: <p>I am building a Windows application based on Qt using VisualStudio 2017 Professional (15.9.35) and the Qt VS Tools add-on. The project compiled fine up to a certain point, now the linker gives the error:</p>
  <pre><code>10&gt;MSVCRTD.lib(exe_winmain.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function &quot;int __cdecl invoke_main(void)&quot; (?invoke_main@@YAHXZ)
  </code></pre>
  <p>The target Qt version is Qt-5.12.10-msvc2017-32 (my application is 32-bit). My application defines main(), I expect WinMain to be defined by Qt which in turn will call my main() (as stated <a href="https://stackoverflow.com/questions/39689162/qt-project-in-visual-studio-2015-unresolved-external-symbol-wwinmain">here</a>, it worked at earlier stages of the development)</p>
  <p>What I've checked (in the project for the application, and also in the dependency libraries project that are in the same VS solution):</p>
  <ul>
  <li>Qt modules: core;gui;testlib;widgets</li>
  <li>Subsystem: Windows (/SUBSYSTEM:WINDOWS)</li>
  <li>Character Set: blank (it's not either &quot;Not set&quot;, it's set that way by the Qt VS Tools add-on when first creating a project)</li>
  <li>Treat wchar_t as built-in type: Yes (/Zc:wchar_t)</li>
  </ul>