This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: undefined reference to vtable
- From: KK singh <kk_singh at yahoo dot com>
- To: KK singh <kk_singh at yahoo dot com>, gcc-help at gcc dot gnu dot org
- Date: Tue, 28 Oct 2003 04:04:52 -0800 (PST)
- Subject: Re: undefined reference to vtable
Also, parent has only one virtual member, i.e. its
destructor. Child has no virtual members and all the
members declared in child are defined.
So what is causing this problem ????
--- KK singh <kk_singh@yahoo.com> wrote:
> 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/
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/