Sign in to follow this  
d000hg

DirectSound won't compile in MFC?!

Recommended Posts

Compiling...
DirectSoundTest1.cpp
c:\dxsdk\include\dsound.h(228) : error C2143: syntax error : missing ';' before '*'
c:\dxsdk\include\dsound.h(228) : error C2501: 'LPCWAVEFORMATEX' : missing storage-class or type specifiers
c:\dxsdk\include\dsound.h(347) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
c:\dxsdk\include\dsound.h(347) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiers
c:\dxsdk\include\dsound.h(347) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiers
c:\dxsdk\include\dsound.h(363) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
c:\dxsdk\include\dsound.h(363) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiers
c:\dxsdk\include\dsound.h(363) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiers
c:\dxsdk\include\dsound.h(414) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
c:\dxsdk\include\dsound.h(414) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiers
c:\dxsdk\include\dsound.h(414) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiers
c:\dxsdk\include\dsound.h(423) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
c:\dxsdk\include\dsound.h(423) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiers
c:\dxsdk\include\dsound.h(423) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiers
c:\dxsdk\include\dsound.h(684) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
c:\dxsdk\include\dsound.h(694) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'
c:\dxsdk\include\dsound.h(768) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
c:\dxsdk\include\dsound.h(778) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'
c:\dxsdk\include\dsound.h(1039) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
c:\dxsdk\include\dsound.h(1097) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
c:\program files\microsoft visual studio\vc98\include\mmsystem.h(728) : error C2373: 'WAVEFORMATEX' : redefinition; different type modifiers
        c:\dxsdk\include\dsound.h(228) : see declaration of 'WAVEFORMATEX'
c:\program files\microsoft visual studio\vc98\include\mmsystem.h(729) : error C2378: 'LPCWAVEFORMATEX' : redefinition; symbol cannot be overloaded with a typedef
        c:\dxsdk\include\dsound.h(228) : see declaration of 'LPCWAVEFORMATEX'
c:\program files\microsoft visual studio\vc98\include\mmsystem.h(774) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'
c:\program files\microsoft visual studio\vc98\include\mmsystem.h(830) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'
[Edited by - Coder on December 3, 2004 12:48:50 PM]

Share this post


Link to post
Share on other sites
Oh wait, now it does ... I had to include <mmsystem.h> before <dsound.h> got included. Still not too happy since randomly including things isn't the best approach to a problem - is there a better fix or is this what I should be doing?

Thanks.

Share this post


Link to post
Share on other sites

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