Advertisement Jump to content
Sign in to follow this  
Oni Sephiroth

pointer trouble

This topic is 3992 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.*/

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
You told the compiler that your class has a constructor and a destructor.
The linker is telling you that it can't find your constructor.

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!