Jump to content
  • Advertisement
Sign in to follow this  
phil67rpg

win32 error code

This topic is 2602 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

I am getting the following error when I try to link a simple win32 window.
[font="Consolas"][size="1"][font="Consolas"][size="1"]wingame.obj : error LNK2019: unresolved external symbol __imp__PlaySoundA@12 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)

1>c:\users\phil\documents\visual studio 2010\Projects\wingame\Debug\wingame.exe : fatal error LNK1120: 1 unresolved externals

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

[/font][/font]

Share this post


Link to post
Share on other sites
Advertisement
The PlaySound function requires you to link to the Winmm.lib (look towards the bottom of the page under the "Requirements" section). Make sure that you're linking to that library in your project. Right now the linker is saying that it sees you want to use that function, but it can't find a definition for that function.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!