Click to See Complete Forum and Search --> : Win32 Help


Bobbysl
October 25th, 2008, 10:36 AM
I just started win32 programing. I got a book on win32 but its out of date. When i try compile the code it gave me i get this error

"1>Linking...
1>win1.obj : error LNK2019: unresolved external symbol __imp__PlaySoundW@12 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)"

Can anyone help me?
Thanks

Notsosuperhero
October 25th, 2008, 01:19 PM
Are you linking to Winmm.lib?

Bobbysl
October 26th, 2008, 12:11 AM
I'm not sure. How do i make it so?
Thanks

Notsosuperhero
October 26th, 2008, 01:25 AM
If you are using visual studio, go to project properties(Alt+F7) in Configuration Properties->Linker->Input in additional dependencies box, write "winmm.lib"
or you could put

#pragma comment(lib, "winmm.lib")

in one of your files.

If you aren't using Visual Studio, you'll have to look through the IDE/Compiler manual to find out how to add static libraries.