Advertisement

PlaySound compile problems

Started by October 10, 2000 10:06 PM
4 comments, last by Peon 24 years, 3 months ago
Hey all I''m writing a simple window, and I want to play a sound when I create the window (I''m following LaMothe''s book) But everytime I try and compile, I get this: --------------------Configuration: winresource - Win32 Debug-------------------- Compiling... source.cpp Linking... source.obj : error LNK2001: unresolved external symbol __imp__PlaySoundA@12 Debug/winresource.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. winresource.exe - 2 error(s), 0 What does this mean anyway, and how can I fix it? Thanks guys Peon
Peon
you''ve gotta add winmm.lib to your project

------------------------
IUnknown *pUnkOuter

"Just do your best and
don't worry"
--Morrissey

"Try the best you can
try the best you can
the best you can is good enough"
--Radiohead

"Are you looking for new ways
to do better than your worst"
--Nick Drake
------------------------IUnknown *pUnkOuter"Try the best you cantry the best you canthe best you can is good enough" --Radiohead
Advertisement
looks like it cant find the PlaySound function
go to project -> settings, and add winmm.lib to the list under the link tab
I CANT BELIEVE THAT! 1 SECOND OFF!! LOL
damn you pUnkOuter
well, you did get the project -> settings part in, which i left out, and which is pretty important...

------------------------
IUnknown *pUnkOuter

"Just do your best and
don't worry"
--Morrissey

"Try the best you can
try the best you can
the best you can is good enough"
--Radiohead

"Are you looking for new ways
to do better than your worst"
--Nick Drake
------------------------IUnknown *pUnkOuter"Try the best you cantry the best you canthe best you can is good enough" --Radiohead
Thanks! I was trying to #include that library for awhile, hehe. LaMothe''s book is great, but some stuff he takes for granted (I had no idea what he meant by include WINMM.LIB, so I did what I thought was right )

Anyway, I appreciate it Works great now.
Peon

This topic is closed to new replies.

Advertisement