Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object Model Trouble

Status
Not open for further replies.

swingkyd

Programmer
Jul 10, 2003
34
CA
I'm having great difficulties with my object model. I hope someone can help me since i'm really stuck!

Does anybody know how to start troubleshooting linder errors?

I keep getting the following error:
"busdes.obj : error LNK2001: unresolved external symbol public: void __thiscall UserInput::eek:penfile(char *,unsigned int)" (?openfile@UserInput@@QAEXPADI@Z)
Debug/bus_program.exe : fatal error LNK1120: 3 unresolved externals"

Do you need the clode?
 
Could be you declared a member function, but didn't define it, ie:

struct foo {
void bar(){ } // declared and defined
void baz(); // only declared
};
 
Is UserInput a library of your own or a 3rd party ?
If it is not yours, or your from another project have you included it in your project settings (I get this a lot when I forget to add the .lib files to the project)

K
 
*sigh*

thanks for the ideas...what happened was that I had an object declared in two places...

for instance:
Two objects: UserInput and 'io' both declared "ofstream fin". Since UserInput was a child to 'io', the linker seemed to get confused! (rightly so)

Linker errors are so stupid! They give no information about what's wrong! *sigh*

Thanks for the ideas. it all helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top