Sign in to follow this  

pointer trouble

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

This topic is 3589 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this