Help me with "fatal error C1189: #error : WINDOWS.H already included"
Hello,
I have made few changes to my code like included the CAN Dll file with in my Application code.I am using VS 2008 and after compiling I am getting this error:
Re: Help me with "fatal error C1189: #error : WINDOWS.H already included"
Originally Posted by GCDEF
This line from the error seems pretty self-explanatory to me.
"MFC apps must not #include <windows.h>"
But I haven't used #include <windows.h>,except for the file server_main.cpp. When i am trying to remove the<windows.h> from that file I am getting the error as
1>ServerMain.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (_PROPSHEETPAGEA): (0x020003ab).
1>ServerMain.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (_PROPSHEETPAGEW): (0x020003ae).
1>ServerMain.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (tagLVITEMW): (0x020004ec).
1>ServerMain.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (tagTOOLINFOW): (0x02000657).
1>ServerMain.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (tagLVCOLUMNW): (0x0200066c).
1>ServerMain.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (tagLVHITTESTINFO): (0x020006ef).
1>ServerMain.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (tagREBARBANDINFOW): (0x02000820).
1>ServerMain.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (_HD_ITEMW): (0x0200082d).
1>ServerMain.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (MCHITTESTINFO): (0x0200083d).
1>LINK : fatal error LNK1255: link failed because of metadata errors
Re: Help me with "fatal error C1189: #error : WINDOWS.H already included"
I don't know what those link errors mean, but you won't see them until the program compiles successfully, so by removing Windows.h, you've eliminated the original problem and moved on to the next one.
Bookmarks