So I am trying to create sound in Dev C++ , I keep coming up with the problem stating that sound delay and nosound [link error] undefined reference, So i tried creating a project with the same code and linking -lwinmm but now it just says those three things are undeclared. Can anyone help me figure this out, been searching through the forums and web for an answer.
OS is windows 7 btw
Code:
#include <stdio.h>
#include <dos.h>
#include <conio.h>
void my_sounds(void);
int music(int pitch, int time)
{
sound(pitch);
delay(time);
nosound();
return(0);
}
void my_sounds(void)
{
sound(130); /* make a sound at 500 Hz.*/
delay(2000); /* pause for 2000 milliseconds = 2 seconds */
nosound();
}