winnt.h 錯誤

在 VS2005 中編譯出現

C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'

找到 winnt.h

將以下

typedef void * POINTER_64 PVOID64;

改為

typedef void *POINTER_64;
typedef void *PVOID64;

就可以過了。

但影響未知,如果在 32 bits OS 上似乎沒問題?

2009/9/21 補充:

在錯誤的那兩行前加入

#define POINTER_64 __ptr64

似乎也是一種解決方式。

留言

熱門文章