Debug errors 'vtable for...' , undefined references to destructor ????
I'm trying to test a component (led from 3electrons).
This is the errors I get, and I dont understand nothing.....
Pleas help...
debug/moc_led.o:moc_led.cpp:(.rdata$_ZTV3Led[vtable for Led]+0x14): undefined reference to `Led::~Led()'
debug/moc_led.o:moc_led.cpp:(.rdata$_ZTV3Led[vtable for Led]+0x18): undefined reference to `Led::~Led()'
debug/moc_led.o:moc_led.cpp:(.rdata$_ZTV3Led[vtable for Led]+0xf4): undefined reference to `non-virtual thunk to Led::~Led()'
debug/moc_led.o:moc_led.cpp:(.rdata$_ZTV3Led[vtable for Led]+0xf8): undefined reference to `non-virtual thunk to Led::~Led()'
Re: Debug errors 'vtable for...' , undefined references to destructor ????
you need to implement your Led destructor.
Code:
class Led
{
...
~Led();
};
Led::~Led()
{
// do something
}
Re: Debug errors 'vtable for...' , undefined references to destructor ????
Nothing....
This led component are extending another widget. This one has it's own destructor.
Initially the code was virtual ~Led();
I can't compile it with any combination.
The more strange thing is that there is another component (wallclock) that has not destructor ?....
(This widgets are part of analogwidgets from 3electrons, I'm thinking about contact to author directly ).
Thanks
Added after 14 minutes:
Solved with :
virtual ~Led(){}
But I dont understand that the other widget (wallclock) works if it has not destructor and is extending the same widget that 'led'.
Thanks any way.
Re: Debug errors 'vtable for...' , undefined references to destructor ????
The other widget works probably because you didn't declare a destructor for it so the compiler provided one. But here since you did declare the destructor, you need to implement it.