Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

wcmike

Strange mmsystem error that's driving me crazy

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

Hello, I am trying to use DirectSound for sound effects in my game, but there is always an error in the mmsystem.h file when I attempt to link. The error is as follows: c:\program files\microsoft visual studio\vc98\include\mmsystem.h(113) : error C2146: syntax error : missing '';'' before identifier ''MMVERSION'' I am already linking to the files I should be, including winmm.lib, dxguid.lib, dsound.lib, and others that are not related to this problem. Here is the include section of my code, because possibly I have the order wrong. #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <iostream.h> #include <cstdlib> #include <stdio.h> #include <time.h> #include <math.h> #include <ddraw.h> #include <dinput.h> #include <mmsystem.h> #include "Wave.h" #include "MMIO.h" #include <dsound.h> #include <DShow.h> I am using Microsoft Visual C++ 6.0 and have Windows XP. Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
have you tried:

extern "C" {
#include <mmsystem.h>
}


(probobly won''t work, but it always good to try it when you get syntax error''s in header''s not written by yourself.)

Share this post


Link to post
Share on other sites
Hi Smurfwow,

I just tried it, but it didn''t work.
Thanks for trying to help though.

Any more suggestions anyone?

Share this post


Link to post
Share on other sites
Hi IndirectX,

That did not work. I know what you're trying because line 113 of uses a UINT which is defined as a WIN32 type, but it still gives the same error.

Thanks for the suggestion, any more anyone?

[edited by - wcmike on April 29, 2002 1:01:30 AM]

Share this post


Link to post
Share on other sites
Try getting rid of the lean and mean windows define. I know that skips some data types, and it may well be skipping the one you want.

Share this post


Link to post
Share on other sites
Yo Baynah,

Nope, still the same error.

Thanks for the effort though. Does anyone know how to correct this?

Share this post


Link to post
Share on other sites
Woohoo! I got it to work!
Sorry for wasting everybody''s time, I am so stupid.
The problem was that in a different file mmsystem.h was included without having windows.h included before it.

My apologies again, and thanks to all those who gave advice.

Good day.

Share this post


Link to post
Share on other sites
FYI: Last I knew WinMM was a 16 bit DLL. You will take a hit cause Windows has to thunk your calls to it.

I may be wrong but last year it was still in 16 bit land. They may have updated it.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!