Menu

Help with DevC++ (PlaySound)

2003-02-12
2012-09-26
  • Nobody/Anonymous

            PlaySound(MAKEINTRESOURCE(SOUND_ID_TECHNO), hinstance_app, SND_RESOURCE | SND_ASYNC | SND_LOOP);

    I am sure that my .rc and header file are correct (SOUND_ID_TECHNO) I get a strange error when I try to Compiler & Run (F9) here it is:

    [Linker error] undefined reference to `PlaySoundA(char const*, HINSTANCE__*, unsigned long)'

    Can someone please help me :)

     
    • Nobody/Anonymous

      It is weird. I guess you have the prototype for the function in one of your headers, but you dont have the function in a dll or static library. The linker cannot find it.

      Am i correct?

       
    • Nobody/Anonymous

      Try adding -lwinmm to the "complier:" in the project options.

      - rec

       
    • Nobody/Anonymous

      Do you have  -lwinmm in your project options?
      (Project options->Further object files or...)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.