Jump to content
  • Advertisement
Sign in to follow this  
hoihoi8

Help! dsound.h errors in my game

This topic is 4930 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

Hello, I am getting 6 errors in my game. I just reformatted my computer, reinstalled and updated VC++6 and DirectX (Dec 2004) sdk. The game compiled before the format. I've been stuck on these errors for weeks. Please help someone!!!!! Here are the errors: c:\program files\microsoft directx 9.0 sdk (december 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1' c:\program files\microsoft directx 9.0 sdk (december 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers c:\program files\microsoft directx 9.0 sdk (december 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers c:\program files\microsoft directx 9.0 sdk (december 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2' c:\program files\microsoft directx 9.0 sdk (december 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers c:\program files\microsoft directx 9.0 sdk (december 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers I've already included the DirectX libraries and moved them to the top The top directory under Options > Directories > Include files: C:\Program Files\Microsoft DirectX 9.0 SDK (December 2004)\Include The top directory under Options > Directories > Library files: C:\PROGRAM FILES\MICROSOFT DIRECTX 9.0 SDK (DECEMBER 2004)\LIB\x86 Linked Libraries (besides the ususal VC++6 libs): dxguid.lib ddraw.lib dsound.lib dinput.lib winmm.lib Note: Visual studio is installed on the D: and the sdk is on C:. Doubt that matters though, cause it was set up the same way before I reformatted. Note 2: The same errors also occured with the October 2004 sdk. [Edited by - hoihoi8 on January 15, 2005 7:10:48 PM]

Share this post


Link to post
Share on other sites
Advertisement

1) It's likely you'll need a newer version of the Platform SDK: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdkintro/sdkintro/devdoc_platform_software_development_kit_start_page.asp

The Platform SDK which comes with MSVC 6.0 is from around 1997! (Windows 98 beta). IIRC types like DWORD_PTR were added to the PSDK in around 2000 in preparation for 64-bit Windows.


3) An ugly/evil workaround until you get a newer PSDK and if you're not building for 64-bit might be to include "dplay.h" _before_ including "dsound.h". Dplay.h appears to define DWORD_PTR for older compilers.

This is untested because I use MSVC.NET 2003 and always have an up to date Platform SDK installed.


2) There's a chance you'll have other problems due to the old age of your compiler: http://www.gamedev.net/community/forums/topic.asp?topic_id=288035

[code built with MSVC6 doesn't support security features of newer compilers]

Share this post


Link to post
Share on other sites
What "new security features"? As for the incompatibilities between VC6 and DX9 SDK, the only problem (that I'm aware of) is that D3DX no longer works (which wasn't being used in the game anyway, since it was DirectDraw based). If you have problems with that, you can always download the October SDK.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!