I am getting error :
WINDOWS.H already included. MFC apps must not #include <windows.h>
Help needed.
I am getting error :
WINDOWS.H already included. MFC apps must not #include <windows.h>
Help needed.
Oh well, the error message seems say just everything.
When you've created an MFC app, it already included windows.h.
Using the /showIncludes
preprocessor directive, the output window will display all the includes before the error. There you can find which file erroneously includes windows.h
.
Then find out why this file is needed.
Sometimes, the best way to fix errors is to do as the error message says.
Just a thought.
I believe this is an error on Microsoft's part. After all, the guards on the include file should protect against this issue. A big -10 to Microsoft.
If you use MFC, do not use #include <windows.h>
manually anywhere in your code. MFC includes it in its own way and you already have access do all declarations of this header.