PlaySound function (Windows)
Scroll right to the end, where it tells you about winmm.lib

You need to tell the compiler, actually the linker, where to get the code that implements the function.