Jump to content
  • Advertisement
Sign in to follow this  
Fixxer

Looks like microsoft forgot something...

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

two errors, non are mine!! atleast yet.
c:\program files\microsoft visual studio\vc98\include\mmsystem.h(113) : error 
C2146: syntax error : missing ';' before identifier 'MMVERSION'
c:\program files\microsoft visual studio\vc98\include\mmsystem.h(113) : fatal error C1004: unexpected end of file found


line 113
typedef UINT        MMVERSION;  /* major (high byte), minor (low byte) */


here are the 1st 120 some lines of mmsystem.h
/*==========================================================================
 *
 *  mmsystem.h -- Include file for Multimedia API's
 *
 *  Version 4.00
 *
 *  Copyright 1992 - 1998 Microsoft Corporation.  All Rights Reserved.
 *
 *--------------------------------------------------------------------------
 *
 *  Define:         Prevent inclusion of:
 *  --------------  --------------------------------------------------------
 *  MMNODRV         Installable driver support
 *  MMNOSOUND       Sound support
 *  MMNOWAVE        Waveform support
 *  MMNOMIDI        MIDI support
 *  MMNOAUX         Auxiliary audio support
 *  MMNOMIXER       Mixer support
 *  MMNOTIMER       Timer support
 *  MMNOJOY         Joystick support
 *  MMNOMCI         MCI support
 *  MMNOMMIO        Multimedia file I/O support
 *  MMNOMMSYSTEM    General MMSYSTEM functions
 *
 *==========================================================================
 */

#ifndef _INC_MMSYSTEM
#define _INC_MMSYSTEM   /* #defined if mmsystem.h has been included */

#ifdef _WIN32
#include <pshpack1.h>
#else
#ifndef RC_INVOKED
#pragma pack(1)
#endif
#endif

#ifdef __cplusplus
extern "C" {            /* Assume C declarations for C++ */
#endif  /* __cplusplus */

#ifdef _WIN32
#ifndef _WINMM_
#define	WINMMAPI	DECLSPEC_IMPORT
#else
#define	WINMMAPI
#endif
#define _loadds
#define _huge
#else
#define	WINMMAPI
#endif

#ifdef _WIN32_VXD

#define NEAR
#define FAR

#define DECLARE_HANDLE(x) typedef WORD x
#define WINAPI

typedef DWORD LPSTR;
typedef DWORD LPVOID;
typedef DWORD LPCSTR;
typedef DWORD LPCWSTR;
typedef DWORD LRESULT;
typedef DWORD LPARAM;
typedef DWORD WPARAM;

typedef short WCHAR;

#endif

/****************************************************************************

		    General constants and data types

****************************************************************************/

/* general constants */
#define MAXPNAMELEN      32     /* max product name length (including NULL) */
#define MAXERRORLENGTH   256    /* max error text length (including NULL) */
#define MAX_JOYSTICKOEMVXDNAME 260 /* max oem vxd name length (including NULL) */

/*
 *  Microsoft Manufacturer and Product ID's (these have been moved to
 *  MMREG.H for Windows 4.00 and above).
 */
#if (WINVER <= 0x030A)
#ifndef MM_MICROSOFT
#define MM_MICROSOFT            1   /* Microsoft Corporation */
#endif

#ifndef MM_MIDI_MAPPER
#define MM_MIDI_MAPPER          1   /* MIDI Mapper */
#define MM_WAVE_MAPPER          2   /* Wave Mapper */
#define MM_SNDBLST_MIDIOUT      3   /* Sound Blaster MIDI output port */
#define MM_SNDBLST_MIDIIN       4   /* Sound Blaster MIDI input port */
#define MM_SNDBLST_SYNTH        5   /* Sound Blaster internal synthesizer */
#define MM_SNDBLST_WAVEOUT      6   /* Sound Blaster waveform output */
#define MM_SNDBLST_WAVEIN       7   /* Sound Blaster waveform input */
#define MM_ADLIB                9   /* Ad Lib-compatible synthesizer */
#define MM_MPU401_MIDIOUT      10   /* MPU401-compatible MIDI output port */
#define MM_MPU401_MIDIIN       11   /* MPU401-compatible MIDI input port */
#define MM_PC_JOYSTICK         12   /* Joystick adapter */
#endif
#endif


i couldnt find anything wrong, but then again im very new to the pre processor stuff.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I highly doubt Microsoft messed up. They recheck and recheck and... their code. But they are human (i think), so they could have messed up.

Share this post


Link to post
Share on other sites
I really doubt that's microsoft.. I think you have to include windows.h or stdio.h or something like that before that one.. It's probably caused by not having UINT defined, which is defined in windows.h (I think)..

Share this post


Link to post
Share on other sites
here is my include statements


// Say no to MFC ////////////////////////////////////////////////////
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif

// Include statements ////////////////////////////////////////////////
#ifndef WINDOWS_H
#define WINDOWS_H
#include <windows.h>
#endif

#ifndef WINDOWSX_H
#define WINDOWSX_H
#include <windowsx.h>
#endif

#ifndef STDIO_H
#define STDO_H
#include <stdio.h>
#endif

#ifndef MMSYSTEM_H
#define MMSYSTEM_H
#include <mmsystem.h>
#endif

#ifndef MATH_H
#define MATH_H
#include <math.h>
#endif

Share this post


Link to post
Share on other sites
The header files should come with their own guards.

Try just doing:


#include <windows.h>
#include <mmsystem.h>



without all the #ifndef crap

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!