-
Strange mmsystem error
Hi, I'm currently working off a tutorial, but I can't get past the 3rd line of code :( This is my code so far:
Code:
#pragma comment (lib, "dsound.lib")
#pragma comment (lib, "winmm.lib")
#include <mmsystem.h> //<----------
#include <dsound.h>
When I try to compile, I keep getting this error:
Code:
(...)/mmsystem.h(113) : error C2146: syntax error : missing ';' before identifier 'MMVERSION'
(...)/mmsystem.h(113) : fatal error C1004: unexpected end of file found
I'm pretty sure all the proper libs are linked, at least all the ones mentioned in the tutorial, unless the #pragma comment isn't the correct way to do it (?). The program compiles fine if I comment out the "#include <mmsystem.h>". Does anybody know what I'm doing wrong, or should I reinstall my compiler/sdk?
-
Looks like it's hanging on the UINT. Try including <windows.h> before <mmsystem.h>.
-
Ok, thanks. I'll try it when I get home, I think it should work.
**EDIT**
You da man! :)