Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Including mmsystem.h - ERRORS

Status
Not open for further replies.

rickcheney

Programmer
Sep 18, 2003
3
JP
Hello,


I'm writing an app that uses the functions defined in mmsystem.h. At the moment its just a skeleton - a Form with a few controls on it but no code yet.

I've started writing a new class CSoundDevice, which again only has a constructor with no code and its only include is mmsystem.h.

When I attempt to build I get hundreds of errors from within mmsystem.h!?

What can I do about this?





Error List:
Error E2257 C:\Borland\bcc55\Include\mmsystem.h 114: , expected
Error E2257 C:\Borland\bcc55\Include\mmsystem.h 122: , expected
Error E2303 C:\Borland\bcc55\Include\mmsystem.h 130: Type name expected
Error E2139 C:\Borland\bcc55\Include\mmsystem.h 130: Declaration missing ;
Error E2303 C:\Borland\bcc55\Include\mmsystem.h 131: Type name expected
Error E2238 C:\Borland\bcc55\Include\mmsystem.h 131: Multiple declaration for
'mmtime_tag:: ::DWORD'
Error E2344 C:\Borland\bcc55\Include\mmsystem.h 130: Earlier declaration of
'mmtime_tag:: ::DWORD'
Error E2139 C:\Borland\bcc55\Include\mmsystem.h 131: Declaration missing ;
Error E2303 C:\Borland\bcc55\Include\mmsystem.h 132: Type name expected
Error E2238 C:\Borland\bcc55\Include\mmsystem.h 132: Multiple declaration for
'mmtime_tag:: ::DWORD'
Error E2344 C:\Borland\bcc55\Include\mmsystem.h 131: Earlier declaration of
'mmtime_tag:: ::DWORD'
Error E2139 C:\Borland\bcc55\Include\mmsystem.h 132: Declaration missing ;
Error E2303 C:\Borland\bcc55\Include\mmsystem.h 133: Type name expected
Error E2238 C:\Borland\bcc55\Include\mmsystem.h 133: Multiple declaration for
'mmtime_tag:: ::DWORD'
Error E2344 C:\Borland\bcc55\Include\mmsystem.h 132: Earlier declaration of
'mmtime_tag:: ::DWORD'
Error E2139 C:\Borland\bcc55\Include\mmsystem.h 133: Declaration missing ;
Error E2303 C:\Borland\bcc55\Include\mmsystem.h 138: Type name expected
Error E2139 C:\Borland\bcc55\Include\mmsystem.h 138: Declaration missing ;
Error E2303 C:\Borland\bcc55\Include\mmsystem.h 139: Type name expected
Error E2238 C:\Borland\bcc55\Include\mmsystem.h 139: Multiple declaration for
'mmtime_tag:: :: ::BYTE'
Error E2344 C:\Borland\bcc55\Include\mmsystem.h 138: Earlier declaration of
'mmtime_tag:: :: ::BYTE'
Error E2139 C:\Borland\bcc55\Include\mmsystem.h 139: Declaration missing ;
Error E2303 C:\Borland\bcc55\Include\mmsystem.h 140: Type name expected
Error E2238 C:\Borland\bcc55\Include\mmsystem.h 140: Multiple declaration for
'mmtime_tag:: :: ::BYTE'
Error E2344 C:\Borland\bcc55\Include\mmsystem.h 139: Earlier declaration of
'mmtime_tag:: :: ::BYTE'
Error E2228 C:\Borland\bcc55\Include\mmsystem.h 139: Too many error or warning
messages
 
Do you have any other include except "mmsystem" ? If not, that might be the reason! Include "vcl.h" before "mmsystem.h" and it should work.
 
Me again... I assumed C++Builder, but you are obviously not using it. In that case try including both "windows.h" and "windowsx.h"
 
I am using C++ builder, but the class was not a form so VCL.h was not already included.

It is now though, and it compiles!

Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top