Jump to content
  • Advertisement
Sign in to follow this  
nullsmind

dsound.h problems with VS 2005 Standard

This topic is 4498 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 have a running D3D program with joystick support and all, but when I add dsound.h, I get 21 errors. I have dsound.lib included, so that's not the problem. Here's what I'm getting: Compiling... DirectX Application.cpp c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(230) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(230) : error C2143: syntax error : missing ';' before '*' c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(230) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(349) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat' c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(349) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(349) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(365) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat' c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(365) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(365) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(416) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat' c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(416) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(416) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(425) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat' c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(425) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(425) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(686) : error C2061: syntax error : identifier 'LPWAVEFORMATEX' c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(696) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX' c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(770) : error C2061: syntax error : identifier 'LPWAVEFORMATEX' c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(780) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX' c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(1041) : error C2061: syntax error : identifier 'LPWAVEFORMATEX' c:\program files\microsoft directx sdk (february 2006)\include\dsound.h(1099) : error C2061: syntax error : identifier 'LPWAVEFORMATEX' Build log was saved at "file://c:\Documents and Settings\Owner\My Documents\Visual Studio 2005\Projects\DirectX Application\DirectX Application\Debug\BuildLog.htm" DirectX Application - 21 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites
Advertisement
wild guess...

// you're defining this?
#define WIN32_LEAN_AND_MEAN

// you'll need these two headers included before dsound.h
#include <windows.h>
#include <mmsystem.h>
#include <dsound.h>

Share this post


Link to post
Share on other sites
Cool, all I did was just add mmsystem.h and it compiled. I guess the next question is, "why would mmsystem.h be needed for dsound.h to work?"

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!