Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 652

error C2011: 'HMONITOR__': 'struct' type redefinition

$
0
0

I was given a rather large old Project that I'm currently in the process of writing Cmake files for.I have a complication now between windef.h and dxgi.h the Error occurse at the this code block.

#if !defined(HMONITOR_DECLARED) && !defined(HMONITOR) && (WINVER < 0x0500)#define HMONITOR_DECLARED#if 0typedef HANDLE HMONITOR;#endifDECLARE_HANDLE(HMONITOR);#endif

It is trying to redefine HMONITOR but it should just skip this If because the WINVER Variable is 0x0A00.

I've looked at different locations in the code if the headers are getting included in the wrong order. I'm expecting that it is a error with the Properties of my project and that the compiler is not understanding that it can skip that code segment. I just don't know what setting that could be or where i would need to look.

1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared\dxgi.h(224,1): error C2011: 'HMONITOR__': 'struct' type redefinition

what is a good way to find out where this include is?


Viewing all articles
Browse latest Browse all 652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>