Jump to content
  • Advertisement
Sign in to follow this  
gav86

unresolved external symbols

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

well for starters unresolved external symbols are really starting to get to me - alot of the time they are really difficult for me to determine where the problem is. The current one that's getting me is this:
Quote:
winmain.obj : error LNK2001: unresolved external symbol "public: bool __thiscall block::move(enum DIRECTION)" (?move@block@@QAE_NW4DIRECTION@@@Z)
Now I'm not sure if this line is referring to the place in my code where the function block::move() is actually called or where it is defined... Here is the line that calls it:
		if(testBlock->move(DOWN))
And here is its definition:
bool move(DIRECTION d)
{
	for(int i=0; i<4; i++)
	{
		squareArray.move(d);
	}
	return true;
}
PS: hope i got the tags right not sure how theyre done here on gdnet... Any & All help appreciated!!

Share this post


Link to post
Share on other sites
Advertisement
I'm guessing the problem is you forgot to define the function as a member function. i.e.:

bool move(DIRECTION d)

should be:

bool block::move(DIRECTION d)

Share this post


Link to post
Share on other sites
*hangs head in shame*

right you are. . right you are...
cant believe I didnt notice!!

oh well, thanks! Now I can get back to work at least..

I'm sure ill do the same thing 100 times more before I learn :P

Share this post


Link to post
Share on other sites
Post all your code.

It seems that your declared it in a class named block

So to define the function in that block class, you write block:: between the return datatype declaration and the function name.

bool block::move(DIRECTION d)
{
for(int i=0; i<4; i++)
{
squareArray.move(d);
}
return true;
}

I think it's the problem here.

EDIT: sorry I wasn't fast enough, SiCrane already answeared

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.

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

Sign me up!