Jump to content
  • Advertisement
Sign in to follow this  
d000hg

DirectSound won't compile in MFC?!

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

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
Advertisement
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
try including this:

#include <d3dx9.h>

it should solve most your problems. Just remember to include the proper .lib files thats all. Take a look at this header and you will see why. Good Luck.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!