Seems that you forgot to include winmm.lib