I tried to compile Teapot Wars in Visual C++ Express Edition. Everything seems to be working correctly, however I am getting 5 errors in the winnt.h file. Is their an updated file somewhere, or am I doing something wrong?
Compile troubles
This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.
-
-
What are the errors?.Code
push you ; haha! -
The error seems to be regarding the declaration of PVOID64 and its related uses. The specific errors are as follows:
winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'
winnt.h(222) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
winnt.h(5940) : error C2146: syntax error : missing ';' before identifier 'Buffer'
winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int -
The specific lines of code and their surronding context:
(221) typedef void *PVOID;
(222) typedef void * POINTER_64 PVOID64;
(5939) typedef union _FILE_SEGMENT_ELEMENT {
(5940) PVOID64 Buffer;
(5941) ULONGLONG Alignment;
(5942) }FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT; -
After looking around I see other people have had this issue. I was able to fix the problem. Thanks.
-
What was the fix?Mr.Mike
Author, Programmer, Brewer, Patriot -
The solution was to place
#define POINTER_64 __ptr64
above the declaration of PVOID64. It isn't an elegant fix, however it has worked for myself and other individuals without any problems.
-
Share
- Facebook 0
- Twitter 0
- Google Plus 0
- Reddit 0