title: Visual Studio 2010 includes MFC even though empty console application is specified (C++)
body: <p>I've spent most of my day trying to figure out why this error is occurring but it continues to mystify me.</p>
  
  <p>I created a console application in Visual C++ and specified it to be empty. After putting all of my source in the virtual folder and compiling it an error occurred:</p>
  
  <blockquote>
    <p>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(24): fatal error C1189: #error :  Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]   </p>
    
    <p>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(24): fatal error C1189: #error :  Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]  </p>
    
    <p>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(24): fatal error C1189: #error :  Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]</p>
  </blockquote>
  
  <p>Strange error indeed, because I never included any MFC files. So I remedied the situation by specifying "/MT" in the code generation settings.</p>
  
  <p>This worked well...until I decided to include "Windows.h", which spawned this error:</p>
  
  <blockquote>
    <p>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxv_w32.h(16): fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include windows.h   </p>
    
    <p>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxv_w32.h(16): fatal   error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include windows.h   </p>
  </blockquote>
  
  <p>I've tried everything I could think of, including recreating the project with and without precompiled headers, a Win32 app rather than console, and a WxWidget app. All of these apps seemingly try to include MFC even though I never specified. Can anyone shed some light on this problem? Thank you!</p>