problem with virtual functions

Alexandre Oliva aoliva@redhat.com
Thu May 17 12:55:00 GMT 2001


On May 17, 2001, vok@cfar.umd.edu wrote:

> /home/vok/lib/libTrackTools.so: undefined reference to `GTracker
> type_info function'
> /home/vok/lib/libTrackTools.so: undefined reference to `GTracker
> type_info node'
> /home/vok/lib/libTrackTools.so: undefined reference to `GTracker virtual
> table'

> Are those internal references that are used by the compiler?
> Where do they come from?

In general, from constructors.  GCC emits these symbols along with the
first non-inline virtual member function of a class.  Make sure this
member function is defined somewhere.  A definition is required for
every virtual member function, per the C++ Standard.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



More information about the Gcc mailing list