Archived

This topic is now archived and is closed to further replies.

Another little MSVC++6.0 compiler error...

This topic is 6020 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I need help on a compiler error that seems to make no sense. Whenever i try to compile a program I made (which makes a blank window with a usable menu bar), I always get this error -LNK2001: unresolved external symbol __imp__PlaySoundA@12 ! I know it''s refering to the PlaySound function, that basically plays sounds, which is in the header file mmsystem.h . I think I''m supposed to include winmm.lib too, but im not sure... any suggestions wud b great! thanx, KaMiKaZ

Share this post


Link to post
Share on other sites
First, that''s NOT a compiler error but a linker error..

Second, why do you ask this here while you can also just TRY IT?

D*mn, you didn''t even had to ask this question because you already knew how to solve this!
(quote: "I think I''m supposed to include winmm.lib")

(no offense, but you should TRY things first, instead of asking it on a forum and waiting a few hours for an answer you already knew..)

Share this post


Link to post
Share on other sites
yeah i did try it... i tried it a few times but i must have done something like typed it wrong.

Share this post


Link to post
Share on other sites
where did you type winmm.lib? hopefully this is the only problem.

a2k

Share this post


Link to post
Share on other sites
i don''t no... but i changed the project options to automatically include winmm.lib (i forgot how to manually include .lib flies)
thanx all for help

Share this post


Link to post
Share on other sites
Project -> Settings... -> Link -> Object/library modules: -> type "winmm.lib"


You can also use the following line to include a library:

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

Share this post


Link to post
Share on other sites