I'm having a bit of trouble with PlaySound. I've attempted to link winmm.lib and libwinmm.a with no success and an error saying: ld.exe||cannot find -lwinmm.lib|. I'm using Code::Blocks 10.5 and Windows, donno if that will help but hey. Anywhos, on to the code:
Thanks in advance for any help.Code:#include <iostream> #include <windows.h> #include <Mmsystem.h> #pragma comment(lib,"winmm.lib") using namespace std; int main() { PlaySound("music.wav", NULL, SND_FILENAME|SND_LOOP); return 0; }