syntax error : missing ';' before identifier 'PVOID64' when compiling winnt.h

前端 未结 6 1073
夕颜
夕颜 2021-01-04 10:57

I\'ve recently got the source-code on a application. When im trying to build the solution, I get an error in all parts where winnt.h is included. The error code

6条回答
  •  -上瘾入骨i
    2021-01-04 11:05

    You need to include windows.h rather than winnt.h. When you include windows.h it will, in turn, include winnt.h. You need to do it this way for the necessary macros to be in place that are needed to compile winnt.h.

    In this case, POINTER_64 is defined in BaseTsd.h like this:

    #define POINTER_64 __ptr64
    

    But if you include winnt.h before including windows.h then POINTER_64 is not defined.

提交回复
热议问题