PlaySound Function of Core SDK not working for me.

PlaySound Function of Core SDK not working for me.

Post by Kohlman » Mon, 01 Dec 2003 11:53:52


Hi Everyone,

This is probably a simple question for you guys, but I'm
new to Visual Studio.Net (VC++) and can't seem to figure
it out on my own.

I got this line of code from the Core SDK Help files:
PlaySound("MouseClick", NULL, SND_SYNC);

It compiles fine, but when it builds and goes through the
linker, I get this message:
SimpleWindow.obj : error LNK2019: unresolved external
symbol __imp__PlaySoundA@12 referenced in function "long
__stdcall WndProc(struct HWND__ *,unsigned int,unsigned
int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)


Am I missing something? I've been looking through help
files for 2 days and I can't seem to figure it out.

Any help at all would be greatly appreciated. Please
respond to XXXX@XXXXX.COM

Thanks again,
Kohlmann
 
 
 

PlaySound Function of Core SDK not working for me.

Post by Chris P » Mon, 01 Dec 2003 12:49:46

"Kohlmann" wrote

No email replies sorry.

When you look at the documentation you will see a ling that says:
Library: Use Winmm.lib.

You need to add this library "winmm.lib" under your linking section.