title: Error on Visual Studio 2017/Windows 2012 - MFC does not support WINVER less than 0x0501
body: <p>When I try to compile my Visual Studio C++ 2017, x86 application on Windows 2012 server, I am getting the below error</p>
  
  <blockquote>
    <p>Error C1189   #error:  MFC does not support WINVER less than 0x0501. 
    Please change the definition of WINVER in your project properties or
    precompiled header.   MyProject   e:\program files (x86)\microsoft visual
    studio\2017\enterprise\vc\tools\msvc\14.13.26128\atlmfc\include\afxv_w32.h    40</p>
  </blockquote>
  
  <p>I added the below code in the stadafx.h file. But it didn't resolve the issue.</p>
  
  <pre><code>    #ifndef _WIN32_WINNT
      #define _WIN32_WINNT 0x601
      #endif
  </code></pre>
  
  <p>How can I make sure that my code should work all the windows operating system equal or higher than windows 2012.</p>
  
  <blockquote>
    <p>Project => Properties=> C/C++ => Precompiled Headers  values are empty. </p>
  </blockquote>
  
  <p>The same code is working if I chose "Any CPU" build option.
  Please let me know the correct configuration,
  Thank you</p>