关于dsound.h的问题error C2501: 'DWORD_PTR' : missing storage-class or type specifiers

--------------------Configuration: as - Win32 Debug--------------------
Compiling...
main.cpp
e:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
e:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
e:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers

执行 cl.exe 时出错.

解决办法:

将DWORD_PTR 改为 int*
加入:
#pragma comment(lib,"gxguid.lib")
就OK了

你可能感兴趣的:(关于dsound.h的问题error C2501: 'DWORD_PTR' : missing storage-class or type specifiers)