Jump to content
  • Advertisement


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


initializing new object

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

im trying to initialize a new object but im getting this error: Compiling... character_Creation.cpp Linking... character_Creation.obj : error LNK2001: unresolved external symbol "public: __thiscall cl_clientCharacter::cl_clientCharacter(char *,short,int,int,int,int,int,int,int,int,int,int,int * const,int,int * const,int,bool,char *)" (??0cl_clientCharacter@@ QAE@PADFHHHHHHHHHHQAHH1H_N0@Z) Debug/The Wastes.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. the problem is somewhere here:
cl_clientCharacter *playerPtr = new cl_clientCharacter( sName[ 0 ],
			age, healthPts, actionPts, skillDistPoints, expPts, inventoryWgt,
			strength, perception, intelligence, agility, luck,
			skillStats, skillStatSize, abltyPts, abltyPtSize, dogFlag, sSex[ 0 ] );

// here is the constructor i''m passing the arguments to:

cl_clientCharacter( char * name, short age, int HP, int ACPTS, int SKPTS, int EXP, 
		                int INVENT, int STR, int PE, int IN, int AG, int LK,
						int SKILL[], int skillSize, int INNATE[], int abltySize, bool dogFlag,
						char *sSex );
can''t see what is wrong. Can''t make sense of the error message....

Share this post

Link to post
Share on other sites
lol. wait. is it because i haven't defined the cl_clientCharacter constructor function yet? ( and i didn't). damn what a dumbass i am.

[edited by - TheOne1 on June 1, 2004 10:07:59 PM]

Share this post

Link to post
Share on other sites
Does the constructor have a body? If its just a prototype, you need to define a body to actually set those values (and thus remove your linker error).

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!