DirectSound header problems

Started by
5 comments, last by Machaira 24 years, 5 months ago
I think you need to include mmsystem.h
(before dsound.h)

-ns

[This message has been edited by NightShade (edited October 22, 1999).]

-ns-
Advertisement
Well, sometimes I don't include the mmsystem.h file and the dsound.h works fine, too?!
Yeah, some other files include mmsystem.h,
such as Windows.h. Sometimes under certain circumstances it will or will not include the file (e.g. if WIN32_LEAN_AND_MEAN is defined, Windows.h won't include mmsystem)

-ns

-ns-
Putting mmsystem.h before dsound.h worked, but putting it after didn't. Now I'm getting an error in mmsystem.h!!!

c:\microsoft visual studio\vc98\include\mmsystem.h(113) : error C2146: syntax error : missing ';' before identifier 'MMVERSION'
c:\microsoft visual studio\vc98\include\mmsystem.h(113) : fatal error C1004: unexpected end of file found

Any clues about this?! This is starting to piss me off!

Thanks everyone!

[This message has been edited by Machaira (edited October 22, 1999).]

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

Hmm, what exactly are you including (and in what order)?
-ns-
I've created a class as a wrapper for DirectSound and included the dsound.h When I compile I get a huge number of errors in the dsound.h file:

d:\directx7 sdk\include\dsound.h(61) : error C2143: syntax error : missing ';' before '*'
d:\directx7 sdk\include\dsound.h(61) : error C2501: 'LPCWAVEFORMATEX' : missing storage-class or type specifiers
d:\directx7 sdk\include\dsound.h(128) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
d:\directx7 sdk\include\dsound.h(128) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiers
d:\directx7 sdk\include\dsound.h(128) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiers
d:\directx7 sdk\include\dsound.h(142) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
d:\directx7 sdk\include\dsound.h(142) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiers
d:\directx7 sdk\include\dsound.h(142) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiers
d:\directx7 sdk\include\dsound.h(193) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
d:\directx7 sdk\include\dsound.h(193) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiers
d:\directx7 sdk\include\dsound.h(193) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiers
d:\directx7 sdk\include\dsound.h(337) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
d:\directx7 sdk\include\dsound.h(346) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'
d:\directx7 sdk\include\dsound.h(607) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'

Any clues anyone?!

Thanks

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

I think I've got it fixed. I included windows.h in the sound class's header. DUH!

Thanks again all.

[This message has been edited by Machaira (edited October 22, 1999).]

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

This topic is closed to new replies.

Advertisement