virtual variadic functions

L

Loony

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
 
R

Ron Natalie

Loony said:
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:

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.
 
D

Dinis Klose

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

Ron Natalie

Dinis Klose said:
Thanks, but I already solved the problem. I forgot the =0 at the end of
the virtual prototype.
Like I said, missing definition of a declared virtual function ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top