Deriving from t2dStaticSprite?
by James Ford · in Torque Game Builder · 03/11/2008 (9:44 pm) · 1 replies
I am attempting to make a new class derived from t2dStaticSprite and am getting the following error:
I'm really at a loss here... Anyone willing scan through my code will be reimbursed in abundant positive karma.
Here is my .h file:
And my .cpp file:
Quote:3>structure.obj : error LNK2001: unresolved external symbol "bool __cdecl VectorResize(unsigned int *,unsigned int *,void * *,unsigned int,unsigned int,char const *,unsigned int)" (?VectorResize@@YA_NPAI0PAPAXIIPBDI@Z)
I'm really at a loss here... Anyone willing scan through my code will be reimbursed in abundant positive karma.
Here is my .h file:
#ifndef _STRUCTURE_H_
#define _STRUCTURE_H_
#ifndef _T2DSTATICSPRITE_H_
#include "T2D/t2dStaticSprite.h"
#endif
class Structure : public t2dStaticSprite
{
typedef t2dStaticSprite Parent;
public:
Structure();
~Structure();
DECLARE_CONOBJECT(Structure);
static void initPersistFields();
//protected:
virtual bool onAdd();
virtual void onRemove();
};
#endif // _STRUCTURE_H_And my .cpp file:
#include "console/consoleTypes.h"
#include "structure.h"
Structure::Structure()
{
// nothing to do
}
Structure::~Structure()
{
// nothing to do
}
IMPLEMENT_CONOBJECT(Structure);
void Structure::initPersistFields()
{
Parent::initPersistFields();
//addField( "actingUnit", TypeSimObjectPtr, Offset( mActingUnit, Action ), "" );
}
bool Structure::onAdd()
{
if(! Parent::onAdd())
return false;
return true;
}
void Structure::onRemove()
{
Parent::onRemove();
}About the author
http://jamesdev.info
Torque Owner Brian Carter
The only thing that I can think of that would cause this linking error for you is that tVector.cc was removed from your solution; however, I would also imagine if that was the case then you would be getting a lot more linking errors than just that one.
Have your tried cleaning the solution and doing a full new build? (I'm sure you have) .. you could have an old dependency messing things up.
It certainly doesnt look like its anything in your code that I can see; however, on saying that I havn't played around with the engine code much or extended it - so I'm not sure if you've missed an important line of initialization / registration code out.