Jump to content
  • Advertisement
Sign in to follow this  
Rottingham

DirectSound-Unable to compile!

This topic is 5478 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
try this link and read the content...
this may explain your problem...

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!