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!

g++ linking fatal errors

Status
Not open for further replies.

solled

Programmer
Nov 3, 2003
6
US
Hi, my files compile fine, but when I try to build them I get the following:

compserv1.55 g++ driver.o SymTabMgr.o SymTabEntry.o
Undefined first referenced
symbol in file
vtable for SymTabEntry SymTabEntry.o
vtable for SymTabMgr SymTabMgr.o
SymTabMgr::~SymTabMgr [in-charge]() driver.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status

I don't even know where to begin. I don't have anything named "vtable". Thanks for helping.
 
The vtable is something the compiler defines when you use virtual functions in your program. That should give you a place to start.

Did you maybe forget to declare a base class's destructor as virtual, then attempt to use it polymorphically?

That's just a guess; post some code that demonstrates how you're trying to use virtual functions for a better response.
 
Yes--I forgot to implement the virtual descructors. It works now. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top