Archived

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

wcmike

Strange mmsystem error that's driving me crazy

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
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
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