DirectSound-Unable to compile!

Started by
1 comment, last by Danzig 19 years, 7 months ago
I am having a problem with directsound and I am unsure what to do! Thanks for any help. I am going through Sams Teach Yourself Game Programming with DirectX. I made a CDirectSound class and included that into my game engine. I first had over 150 errors and then remembered to take the old dsound.h out of Visual Studios include directory so it would only use the SDK version. Once that was solved, I now get these errors: DirectSound.cpp C:\DXSDK\INCLUDE\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1' C:\DXSDK\INCLUDE\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers C:\DXSDK\INCLUDE\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers C:\DXSDK\INCLUDE\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2' C:\DXSDK\INCLUDE\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers C:\DXSDK\INCLUDE\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers That refers to the DSEFFECTDESC struct in dsound.h... #if DIRECTSOUND_VERSION >= 0x0800 typedef struct _DSEFFECTDESC { DWORD dwSize; DWORD dwFlags; GUID guidDSFXClass; DWORD_PTR dwReserved1; DWORD_PTR dwReserved2; } DSEFFECTDESC, *LPDSEFFECTDESC; Anyone have a clue what I should do? Is it just another include file I need to erase from Visual Studios directories?? Thanks for any help I can get! I appreciate it.
Advertisement
Hi,

try this one:

#ifndef _WIN64
#define DWORD_PTR DWORD
#endif

if it works, definately your missing some include...
dword_ptr is used several times so maybe you should
try to "resort" your includes (swap some of them).

Hope this helps...
try this link and read the content...
this may explain your problem...

http://www.toymaker.info/Games/html/directx_9_0c.html

This topic is closed to new replies.

Advertisement