Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

#error WINDOWS.H already included. MFC apps must not #include <windows.h>

Tags:

c++

windows

mfc

I am getting #error WINDOWS.H already included. MFC apps must not #include windows.h But i dont know how do i find out because of which file this is happening

Thanks

like image 719
Uday Avatar asked Jun 19 '09 12:06

Uday


2 Answers

Try turning on "Show Includes" in the projects settings (C/C++ -> Advanced). This show give you an indication of what header files are included and in what order - you should be able to trace back from there

like image 199
Alan Avatar answered Oct 23 '22 10:10

Alan


Change the include order, and include afx < headers > before the others

like image 25
vim Avatar answered Oct 23 '22 09:10

vim