In my development I periodically get linking errors of the form:
"undefined symbol: typeinfo for MyClass".

I understand from previous researching that the cause of this is that
the compiler emits the typeinfo (and vtable info) attached to the
implementation of a chosen virtual method declared by the class.  If
that method isn't implemented, then the typeinfo and/or vtable doesn't
actually get implemented either, and the whole mechanism goes
kablooey.  The lesson to be learned here is to always implement all
declared virtual methods.

The problem I'm running into is that I believe I have done so.  I have
implementations for every method declared in the class, and I'm
getting this link error.

Is there any way to find out what method g++ is expecting to have the
typeinfo attached to?

(curiouser, doing "nm -C" on the resulting .so file is showing a value
in the symbol table for "typeinfo for MyClass", yet it is failing when
linking at runtime).

_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to