WINDOWS.H already included error

compilationvisual-studio-2008

I get an error when trying to compile a small c++ program
Error 87 fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxv_w32.h 16

I made sure that the windows.h was not included in any of the project files I have. I am using a visual studio 2008 IDE

Any reason why ?

Best Answer

reason why is because something is including Windows.h: the compiler is not lying to you.

Go to project Properties->Configuration Properties->C/C++->Advanced and set Show Includes to Yes. Then build, and the compiler will show you a list with every included file found, and in the order it finds it, hereby telling you which file eventually includes windows.h

Related Topic