Archived

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

Agape

Unresolved external symbol

Recommended Posts

Agape    122
Well, what is one, generally speaking? I don''t know why I''m getting it, but I''m thinking it''s related to the code below:

class DVector
{
public:
	float x,y,z;
	DVector();
	DVector(float xx, float yy, float zz);
	~DVector();
};

class Object
{	
protected:
	DVector origin;
public:
	virtual void Draw();
	Object();
	Object(DVector v);
	~Object();
};


class Point : public Object
{
public:
	int pixelSize;
	Point():Object(){};
	Point(DVector v):Object(v){};
	~Point();
	void Draw();
};

void main()
{
    Point* p = new Point(DVector(x,y,0));
}



 
I get this error message in VC++6 object.obj : error LNK2001: unresolved external symbol "public: __thiscall Object::Object(class DVector)" (??0Object@@QAE@VDVector@@@Z)

Share this post


Link to post
Share on other sites
bastardos    100

Unresolved external symbol means the linker can''t find Object::Object (DVector). This is probably because you haven''t written the function into a code file yet. Check the appropriate .cpp files, if you can''t find Object::Object (DVector) in there, then that''s the problem.

.bas

[sPiKie] mmorpg isnt hard in vb

Share this post


Link to post
Share on other sites