Jump to content
  • Advertisement
Sign in to follow this  
Gamesmaster3

What's a Unresolved External Error

This topic is 4872 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'm biting the bullet here.I'm pretty sure everyone is going to think I'm stupid or something because well this is my question.What is a unresolved external error.I can't figure out what's wrong or what I forgot.I haven't included the code because I simply want a general description of the problem and generally speaking what I would be looking for as a solution.I've compiled each cpp file individually with no errors.But when I have the compiler try to link the files together I get these errors.Here are the errors verbatim.I'm pretty sure they are all related. BattleOffice.obj : error LNK2001: unresolved external symbol __imp__PlaySoundA@12 Bitmap.obj : error LNK2001: unresolved external symbol __imp__TransparentBlt@44 GameEngine.obj : error LNK2001: unresolved external symbol __imp__joyGetDevCapsA@12 GameEngine.obj : error LNK2001: unresolved external symbol __imp__joyGetPos@8 GameEngine.obj : error LNK2001: unresolved external symbol __imp__joyGetNumDevs@0 GameEngine.obj : error LNK2001: unresolved external symbol __imp__joySetCapture@16 GameEngine.obj : error LNK2001: unresolved external symbol __imp__joyReleaseCapture@4 GameEngine.obj : error LNK2001: unresolved external symbol __imp__mciSendCommandA@16 Debug/BattleOffice.exe : fatal error LNK1120: 8 unresolved externals Error executing link.exe. BattleOffice.exe - 9 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Gamesmaster3
But when I have the compiler try to link the files together


Exactly. It looks to me like a linker error, which means, although your code is legal, the linker can't find the libraries in which those functions are defined. You need to call extra flags on the linker to make it look for those libraries, and "link" them into your program.

What is it you're using, API and compiler wise?

Share this post


Link to post
Share on other sites
You need to link your project to the Windows Multimedia library, so the code can find those functions.

In Visual C++ .NET, go to project properties, then under Linker, find Input. In the box labelled Aditional Dependancies add winmm.lib

Share this post


Link to post
Share on other sites
I'm using Microsoft Visual Studio.And right now the win32 API.Once you told me that I think I might have the solution.I have to include the msimg32.lib and the winmm.lib files to the project.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!