dsound.h problems with VS 2005 Standard

Started by
1 comment, last by nullsmind 18 years ago
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)
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>
This space for rent.
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?"

This topic is closed to new replies.

Advertisement