Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

DirectSound header problems

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
6 replies to this topic

#1 Machaira   Moderators   

1033
Like
Likes
Like

Posted 22 October 1999 - 10:52 AM

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


#2 NightShade   Members   

122
Like
Likes
Like

Posted 22 October 1999 - 04:57 AM

I think you need to include mmsystem.h
(before dsound.h)

-ns

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


#3 Melo   Members   

122
Like
Likes
Like

Posted 22 October 1999 - 05:34 AM

Well, sometimes I don't include the mmsystem.h file and the dsound.h works fine, too?!

#4 NightShade   Members   

122
Like
Likes
Like

Posted 22 October 1999 - 05:56 AM

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


#5 Machaira   Moderators   

1033
Like
Likes
Like

Posted 22 October 1999 - 07:05 AM

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).]


#6 NightShade   Members   

122
Like
Likes
Like

Posted 22 October 1999 - 09:07 AM

Hmm, what exactly are you including (and in what order)?


#7 Machaira   Moderators   

1033
Like
Likes
Like

Posted 22 October 1999 - 10:52 AM

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).]





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.