Connecting Tech Pros Worldwide Forums | Help | Site Map

virtual variadic functions

Loony
Guest
 
Posts: n/a
#1: Jul 19 '05
Hi,

I have a problem with my code. I am using a virtual class in which I
define a variadic function. This class is inherited by another one
which then implements it. The problem occurs while linking:

undefined reference to `vtable
undefined reference to `typeinfo

I'm using gcc 3.3 to compile the code.

Any help is welcome and would be greatly appreciated. If you are going
to tell me to not use variadic functions, don't, unless you have a
usable alternative. I need a function with n arguments of any type.

Thanx in advance,

Loony

Ron Natalie
Guest
 
Posts: n/a
#2: Jul 19 '05

re: virtual variadic functions



"Loony" <dinisk@netscape.net> wrote in message news:dee51460.0309190235.6d0dea34@posting.google.c om...[color=blue]
> Hi,
>
> I have a problem with my code. I am using a virtual class in which I
> define a variadic function. This class is inherited by another one
> which then implements it. The problem occurs while linking:[/color]

Can you show us an example of a minimal program that demonstrates
the problem. Usually undefined vtable functions in G++ come from
failure to define the declared overriding functions.


Dinis Klose
Guest
 
Posts: n/a
#3: Jul 19 '05

re: virtual variadic functions


Thanks, but I already solved the problem. I forgot the =0 at the end of
the virtual prototype.

Ron Natalie wrote:[color=blue]
> "Loony" <dinisk@netscape.net> wrote in message news:dee51460.0309190235.6d0dea34@posting.google.c om...
>[color=green]
>>Hi,
>>
>>I have a problem with my code. I am using a virtual class in which I
>>define a variadic function. This class is inherited by another one
>>which then implements it. The problem occurs while linking:[/color]
>
>
> Can you show us an example of a minimal program that demonstrates
> the problem. Usually undefined vtable functions in G++ come from
> failure to define the declared overriding functions.
>
>[/color]

Ron Natalie
Guest
 
Posts: n/a
#4: Jul 19 '05

re: virtual variadic functions



"Dinis Klose" <dinis.klose@nospam.com> wrote in message news:bkf73g$16qa$1@pegasus.fccn.pt...[color=blue]
> Thanks, but I already solved the problem. I forgot the =0 at the end of
> the virtual prototype.
>[/color]
Like I said, missing definition of a declared virtual function ;-)


Closed Thread