This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: undefined reference to `typeinfo SOLVED
- From: Ross Boylan <ross at biostat dot ucsf dot edu>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: ross at biostat dot ucsf dot edu, gcc-help at gcc dot gnu dot org
- Date: Thu, 21 Apr 2005 12:58:44 -0700
- Subject: Re: undefined reference to `typeinfo SOLVED
- Organization: University of California San Francisco Biostatistics
- References: <1114034650.12504.94.camel@iron.libaux.ucsf.edu> <42676664.3030308@codesourcery.com>
On Thu, 2005-04-21 at 09:37 +0100, Nathan Sidwell wrote:
> [did you bcc to gnu.org and cc to gno.org? why?]
I mistyped the edress, and then redelivered. I guess my mailer left the
bad edress intact. Sorry.
>
> Ross Boylan wrote:
>
> > The type AbstractLinearProduct is defined in the header for
> > LinearProduct, which is included in the .cc file. Googling, it sounds
> > as if complaints about typeinfo may signal missing RTTI. However, I did
> > not compile with no-rtti, and the included files referenced are all
> > source files.
>
> Are you sure you have a definition of each non-pure virtual function. In
> particular check the first non-inline non-pure virtual function of
> AbstractLinearProduct. The compiler uses that (if it exists) as a key.
> It will emit the vtable, typeinfo and other class related objects in the
> object file containing that key.
>
> nathan
>
Wow! That was the problem exactly. I omitted the =0 from one function
definition.
Now it all works. I don't know how long that would have taken me to
find on my own. Thank you very much.