This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: problem with virtual functions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]