Why won't this play sound? Very annoyed..

PlaySound("C:\\Users\\MyName\\Desktop\\bird.wav", NULL, SND_ASYNC);

is the line which plays the sound

so, the sound im trying to play is a .wav file and it is named "bird" not "bird.wav" but it is a wav file ths i said bird.wav in the playsound..

according to the internet i have to put this in the linker settings "-lwinmm"

and when i do that i get this error "cannot find -1-1winmm"

is what i put into the linker settings wrong?
how to fix??
Last edited on
closed account (E0p9LyTq)
Have you tried PlaySound("C:\\Users\\MyName\\Desktop\\bird", NULL, SND_ASYNC);?

Or renaming bird to bird.wav?

Have you included the Win multi-media library to your project?
@FurryGuy have you bothered reading the full post?

He wrote -lwinmm, but the command line outputs it as -l-lwinmm, which means he should remove the -l from the directive (and the command line should successfully output it as -lwinmm)
closed account (E0p9LyTq)
@SGH, yes I did read the post, the full post, and did notice the error output. Did you see the actual error? "cannot find -1-1winmm"

Maybe he mistook 1 (one) for a lower case l. I know I've made that error a time or two myself.
I remember the font being very bad in the error output panel.
He probably wrote it out by hand and mistook that, the -l error seems the most plausible one.

Anyways he's not answering anymore...
Topic archived. No new replies allowed.