winnt.h(5545) : error C2146: syntax error : missing ‘;’ before identifier ‘ContextRecord’

Anther annoying compiling error.

Compile error
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(5545) : error C2146: syntax error : missing ';' before identifier 'ContextRecord'
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(5545) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(5545) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(11263) : error C2065: 'PCONTEXT' : undeclared identifier
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(11264) : error C2146: syntax error : missing ')' before identifier 'ContextRecord'
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(11264) : warning C4229: anachronism used : modifiers on data are ignored
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(11264) : error C2182: 'RtlCaptureContext' : illegal use of type 'void'
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(11264) : error C2491: 'RtlCaptureContext' : definition of dllimport data not allowed
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(11264) : error C2059: syntax error : ')'
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(12935) : error C3861: '__readfsdword': identifier not found

Solution:
#include "windows.h"

2 Responses to winnt.h(5545) : error C2146: syntax error : missing ‘;’ before identifier ‘ContextRecord’

  1. [...] winnt.h(5545) : error C2146: syntax error : missing ;’ before … Written by Steven Smethurst on October 20, 2009 — Leave a Comment … includewinnt.h(12935) : error C3861: ‘__readfsdword‘: identifier not found … [...]

  2. Trevor Page says:

    Where do I include “windows.h”? In Winnt; at the top, like in my own header files?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>