This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
undefined reference to vtable
- From: KK singh <kk_singh at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 28 Oct 2003 03:35:07 -0800 (PST)
- Subject: undefined reference to vtable
I have implemented a child class with single parent.
Its Public inheritance. Both child and parent are
implemented in seperate .cpp's.
when I am trying to link this .o file into application
executable, I get this link error, right where the
contructor is defined.
In function 'child::child[not-in-charge](parent *):
undefined reference to 'vtable for child'
In function 'child::child[in-charge](parent *):
undefined reference to 'vtable for child'
Two Questions.
1. any ideas, what is causing this ?
2. What is [not-in-charge] and [in-charge] and why the
error have repeated twice.
I am using gcc 3.2.
Also, when I nm the .o file I see that the vtable for
child is undefined.
Regards
-kks
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/