Re: undefined reference to vtable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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/


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux