including windows.h getting errors

Hi All,

While working one of project, I need to include windows.h file.
When build my code I got lots of compile time errors.
Few errors are listed below:


c:\program files (x86)\microsoft sdks\windows\v7.0a\include\driverspecs.h(142): error C2008: '$' : unexpected in macro definition
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\driverspecs.h(294): error C2008: '$' : unexpected in macro definition
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winnt.h(1202): error C2018: unknown character '0x24'
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winnt.h(1202): error C2146: syntax error : missing ';' before identifier 'drv_group'
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winnt.h(1202): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winnt.h(1202): error C3861: '__drv_nop': identifier not found

This is blocker for me.

Could any one came across such errors before, I tried most off all solutions found on google.


Regards,
Akash
I have not seen this kind of error before, but it looks like a configuration issue.
I have the Windows 10 SDK, and I cannot find anything like that in my winnt.h headers.

I presume you are using either MSVC or Clang-CL. I recommend you start up your MSVC installer and make sure you update to the latest Windows SDK.
Topic archived. No new replies allowed.