>>298
winmm.libをリンクしてないから。

#pragma comment(lib, "winmm.lib")

をソースに追加するか、プロジェクトの設定でwinmm.libをリンクするようにする。