PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Linking Error?

Moose or Chuck · 27 Jun 2001, 10:12 UTC
--------------------Configuration: MYGAME - Win32 Debug--------------------
Compiling...
main.cpp
Linking...
main.obj : error LNK2001: unresolved external symbol __imp__PlaySoundA@12
Debug/MYGAME.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Creating browse info file...

MYGAME.exe - 2 error(s), 0 warning(s)



#include <mmsystem.h>

...

     case WM_COMMAND:
           {
                 switch(LOWORD(wparam))
                 {
                       //handle File menu
                 case IDR_MENU1_FILE_EXIT:
                       {
                             PostQuitMessage(0);
                       } break;
                 case IDR_MENU1_HELP_ABOUT:
                       {
                             PlaySound(MAKEINTRESOURCE(IDR_WAVE1),
                       hinstance_app, SND_RESOURCE | SND_ASYNC);

                             MessageBox(hwnd, "by James Sonne", "My Game", MB_OK | MB_ICONQUESTION);
                       } break;
                 } //end switch
           } break; //end WM_COMMAND

...

Do I have to do anything else. I've got the WAVE in my resources, and defined in my resources.h file. PlaySound just doesn't seem to work. HelpLast modification: Moose Master - 06/27/01 at 08:12:45
Moose or Chuck · 27 Jun 2001, 12:24 UTC
WINMM.lib helps
Put that into your tutorial !  ;)
Moose or Chuck · 27 Jun 2001, 13:12 UTC
Well duh.. That's why I ...err... make all these mistakes on purpose. So I know what a n00bie would feel like. Ya.. that's it. ;D
um. ok.