Sign in to follow this  

[Question(solved)]Compile Error when include dsound.h

This topic is 3559 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 trying to use DirectSound to build a testing program of Direct Sound in fact, i did not code anything about Direct Sound however, when i try to #include <dsound.h> to use, there are many compile error on dsound.h but if i comment the #include<dsound.h> , i can compile without any error i also add "dsound.lib" the lniker->input in the properties of the project what's the matter with that??? is there any setting i forgot to set?? thank you very much compile errors are: 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(230) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(230) : error C2143: syntax error : missing ';' before '*' 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(230) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(349) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat' 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(349) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(349) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(365) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat' 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(365) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(365) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(416) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat' 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(416) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(416) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(425) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat' 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(425) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(425) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(686) : error C2061: syntax error : identifier 'LPWAVEFORMATEX' 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(696) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX' 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(770) : error C2061: syntax error : identifier 'LPWAVEFORMATEX' 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(780) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX' 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(1041) : error C2061: syntax error : identifier 'LPWAVEFORMATEX' 1>g:\program files\microsoft directx sdk (june 2007)\include\dsound.h(1099) : error C2061: syntax error : identifier 'LPWAVEFORMATEX' [Edited by - felix1000 on March 21, 2008 10:48:38 AM]

Share this post


Link to post
Share on other sites
Hmmm...that's strange. WAVEFORMATEX is declared in Mmreg.h, which is part of the Windows SDK. I would think that dsound would include that if it depended on it...I suppose you can try including mmreg.h before you include dsound.h and see if that fixes the problem.

However I've never really used Direct Sound either, so I could be missing something obvious as well.

Share this post


Link to post
Share on other sites

This topic is 3559 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this