Jump to content
  • Advertisement

Archived

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

Noky

Linking Error

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

Okay I spend about 4 days "programming" out of this book and after I compile I get 28 errors. I''m like ok I can fix this, so I do. And what happens while I compile again I got 3 errors! SO I go to fix them and I find out their linking errors. Being such a gimp, I''ve decided to turn to you guys. Bestow upon me you infinite wisdom and help a poor sucka out. this is my problem: 02 Game.obj : error LNK2001: unresolved external symbol "public: void __thiscall ConLib::Clear(void)" (?Clear@ConLib@@QAEXXZ) 02 Main.obj : error LNK2001: unresolved external symbol "public: void __thiscall ConLib::SetTitle(char *)" (?SetTitle@ConLib@@QAEXPAD@Z) Debug/02 Main.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. it showed up after changing: m_Monsters [MonsterA].X == m_Monsters [MonsterB].X = 0; m_Monsters [MonsterA].Y == m_Monsters [MonsterB].Y = 0; to.. m_Monsters [MonsterA].X = m_Monsters [MonsterB].X = 0; m_Monsters [MonsterA].Y = m_Monsters [MonsterB].Y = 0; which is correct. Anyone got any help for me? Should I zip my source and post it online for you guys to insul--err help me...

Share this post


Link to post
Share on other sites
Advertisement
You changed something else which caused that problem. The code you posted was a red herring.

Are there any other errors? have you tried cleaning and recompiling? What have you changed in the ConLib source/header files?


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
It''s difficult to say what the cause of your linker error is given two lines of code.
Remember ''=='' is the equivalence where as ''='' is the assignment operator.
Therefore

m_Monsters [MonsterA].X = m_Monsters [MonsterB].X = 0;
m_Monsters [MonsterA].Y = m_Monsters [MonsterB].Y = 0;

Looks very wrong to me.

Share this post


Link to post
Share on other sites
That code is fine KiwiMelon, it''s chaining several assignments together which is legal C++.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
try:
m_Monsters [MonsterB].X = 0;
m_Monsters [MonsterA].X = [MonsterB].X;

m_Monsters [MonsterB].Y = 0;
m_Monsters [MonsterA].Y = [MonsterB].Y;

Share this post


Link to post
Share on other sites
Are the m_Monster.X and m_Monster.Y data members floats or something or are they classes that you made a copy constructor for, which uses those other two functions that are not defined? I assume the first... but this is the only way I can see that the code there could possibly cause those errors....

Marcus

Share this post


Link to post
Share on other sites
I didn''t change anything in ConLib.h or ConLib.cpp I''ll zip the source so you guys can see it yourself . I don''t know what you mean by cleaning but I''ve trying Rebuild All several times.

Share this post


Link to post
Share on other sites
Okay it's uploading now, should be available in the next 5-10 minutes. I'm on 56k so it takes a bit.

You can find the file at: http://bleushift.orchyre.com/Monster.zip

EDIT: It finished uploading, so feel free to download the source it's only 1.24 mb. Please help me . It includes all the obj files and everything. No need to make a folder for it just unzip and a folder will appear . I made it w/ Winzip so I suggest you use that as well.

I'll try rebuilding it a few times and check back on the forums in an hour or so .

[edited by - PSWind on March 31, 2003 3:43:05 PM]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!