Jump to content
  • Advertisement

Archived

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

drdarkon

Unresolved Externals?!?

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

Hello, I am writing the basis for my little game I am making. Everything was going okay when I was compiling, but when I try and build the program I get these errors: --------------------Configuration: Fire Patrol - Win32 Debug-------------------- Compiling... Fire Patrol.cpp Linking... Fire Patrol.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw4 Debug/Fire Patrol.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Fire Patrol.exe - 2 error(s), 0 warning(s) Here is my code... What are unresolved externals and what did I do wrong? Thanks in advance... (I must say the majority of the people here are the most helpful people I have ever met. Thanks a lot All of us beginners appreciate it a lot!) [Edit: The error has nothing to do with your code. Learn to read your compiler documentation; LNK2001 is very common and the documentation gives common causes. Also learn to follow directions and properly set up your environment.] [edited by - Oluseyi on July 1, 2002 4:19:44 AM]

Share this post


Link to post
Share on other sites
Advertisement
usually, there is no need to post such a large piece of code, just the error message. Usually someone will be able to isolate where the error is from that.

Share this post


Link to post
Share on other sites
yup, linker setting it is. make sure you have linked to all necessary .lib files in your project settings.


My compiler generates one error message: "Doesn''t compile."
-Albert Tedja-

Share this post


Link to post
Share on other sites
Externals are "symbols" or "names" that are used which come from outside the code you''ve written, but which are used by your code.
DirectDraw (version 4) uses one of these called _IID_IDirectDraw4. It is found in ddraw.lib. ddraw.h uses it and your code uses ddraw.h - therefore your code uses this symbol. For the compiler to be able to find it, you need to link ddraw.lilb with your project in order for it to compile right.
to do this go to Project->Setting then click on the Link tab. In the Object/Library modules textbox enter in this box at the front: ddraw.lib leaving a space before the next .lib file.

this says "when we''re compiling, make sure to look in ddraw.lib for anything that you may need - as well as all those other ones in the list"
this way it''ll find _IID_DirectDraw4.

hope that clears it up.
Toby

Gobsmacked - by Toby Murray

Share this post


Link to post
Share on other sites

  • 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!