Hi,
I am not able to get out of these simple bugs, but would be great full if some one could answer to weed out from these errors. I included windows.h and some other necessary headers but couldn't able get out of it.
Snippet of errors:
error C2146: syntax error : missing ';' before identifier 'MMVERSION'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C2143: syntax error : missing ';' before '*'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C2146: syntax error : missing ';' before identifier 'ms'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Thanks In Advance
-
Look in
mmsystem.h, lines 112 and 113:#ifdef _WIN32 typedef UINT MMVERSION; /* major (high byte), minor (low byte) */So be sure to include
windows.hbefor includingmmsystem.h, and if it does not help, try#defineing_WIN32manually.Tadmas : Usually all you need to do is #define WIN32 and the headers will take care of it for you. -
To expand on Anton's answer: windows.h
#definesUINTto beunsigned int. That's a C macro define, not atypedef. If you#include windows.hbefore you#include mmsystem.hthe line he points to will be read as:typedef unsigned int MMVERSION;However, if you do it the wrong way 'round, then UINT will expand to nothing, and that line will become:
typedef MMVERSION;That isn't valid C++ and you will get a parse error. Which is exactly what you're getting.
0 comments:
Post a Comment