This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: problem with virtual functions
- To: vok at cfar dot umd dot edu
- Subject: Re: problem with virtual functions
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 17 May 2001 16:55:04 -0300
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Organization: GCC Team, Red Hat
- References: <3B042A65.EDEB63EA@cfar.umd.edu>
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