I've been trying to play a .M4A file with PlaySound(); in code::blocks (C++). I looked on several websites and found nothing that really helped me. I probably made a REALLY small mistake, but if anybody can help, that would be great.
#include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
int main()
{
PlaySound("wt.M4A", NULL, SND_ASYNC | SND_FILENAME);
Beep(1000,1000);
getch(); // wait
return 0;
}
I expect the code to play an audio clip, then play a beeping noise, and I have tried removing beep();
instead, I get an error that says :
Undefined reference to PlaySoundW@12
thanks!