• Advertisement
Sign in to follow this  

pointer trouble

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

I'm trying to use the new command, which isn't working...I have a class and a pointer of that class type, which is then set to a new object of the class. phys_object.h
#include "Phys_Main.h"

class CPhys_Object
{
	/* This class will take in a custom file type from the engine's 
	object generator tool.  You'll pass the file name to a function
	and an object will be created by calling this class' constructor.*/
public:
	CPhys_Object();
	~CPhys_Object();
};

CPhys_Object * pPhys;
void Object_Name (unsigned char * Object_File);
and then i have.. Phys_Object.cpp
#include "Phys_Object.h"


void Object_Name( unsigned char * Object_File )
{
	pPhys = new CPhys_Object;
}
..which is where it stops working, giving me the following error: 1>Phys_Object.obj : error LNK2019: unresolved external symbol "public: __thiscall CPhys_Object::CPhys_Object(void)" (??0CPhys_Object@@QAE@XZ) referenced in function "void __cdecl Object_Name(unsigned char *)" (?Object_Name@@YAXPAE@Z) 1>fatal error LNK1120: 1 unresolved externals

Share this post


Link to post
Share on other sites
Advertisement
Where is the implementation of CPhys_Object() constructor you declare it then call it, but never implement it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement