#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.
Strange mmsystem error that's driving me crazy
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.
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.)
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.)
Hi Smurfwow,
I just tried it, but it didn''t work.
Thanks for trying to help though.
Any more suggestions anyone?
I just tried it, but it didn''t work.
Thanks for trying to help though.
Any more suggestions anyone?
Hi IndirectX,
That did not work. I know what you're trying because line 113 of
Thanks for the suggestion, any more anyone?
[edited by - wcmike on April 29, 2002 1:01:30 AM]
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]
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.
Yo Baynah,
Nope, still the same error.
Thanks for the effort though. Does anyone know how to correct this?
Nope, still the same error.
Thanks for the effort though. Does anyone know how to correct this?
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.
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.
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.
I may be wrong but last year it was still in 16 bit land. They may have updated it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement