Re: [Dev-C++] problem with 'PlaySound' function
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Yeoh H. <ye...@ye...> - 2003-06-11 11:07:33
|
----- Original Message -----
From: "Francisco Velez" <fco...@pr...>
To: <dev...@li...>
Sent: Tuesday, June 10, 2003 2:01 PM
Subject: [Dev-C++] problem with 'PlaySound' function
>
> Can someone help me?
>
> I have this piece of code
>
> case WM_CREATE:
> PlaySound (TEXT ("hellowin.wav"), NULL, SND_FILENAME |
SND_ASYNC)
> ;
> return 0 ;
>
> The problem is I recive the follow message from linker
>
> C:\WINDOWS\TEMP\ccdJDcgb.o(.text+0x1e0):hellowin.c: undefined reference to
> `PlaySoundA@12'
>
> I get that the PlaySound funtcion is defined in the LIBWINMM.A file, but I
> can't get the linker use that file.
> ThankYou: Fracisco Velez
>
>
I have a small Dev-C++ project that plays a wav file.
Here's my code which is the same as yours.
PlaySound (TEXT ("Tada.wav"), NULL, SND_FILENAME | SND_SYNC) ;
Have you set the linker options like this?
Project Options -> Parameters ->Linker
-lwinmm
Regards,
Yeoh
~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
ICT eBooks by Yeoh HS
Free Downloads at http://www.yeohhs.com
~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
|