having problem playing sound

im have trouble playing a sound when a press a button in my project

heres the line of code im using:
PlaySound(TEXT("drum.wav"), NULL, SND_ALIAS | SND_APPLICATION);

i added this into the header file
1
2
#include <mmsystem.h>
#include <winmm.lib> 


but it keeps telling me that it cannot open include file: 'winmm.lib': No such file or directory

Thanks in advance
#include allows you to add header files to your code. A .lib is not a header, and it's not human readable, consider it as compiled code that you can add to other code you're writing, but without allowing the source code to be seen.

You add the lib using your IDE/compilers linker options, or some compilers (MS Visual Studio for example) allow you to add the library with commands such as
#pragma comment(lib, "winmm.lib")


Topic archived. No new replies allowed.