It seems like you're forgetting to link your object file with the library that contains the implementation of that function while generating the executable output file.
According to The MSDN Library, using PlaySound
requires linking with Winmm.lib
.