Debugging vtable Linker errors in GCC

From time to time when using GCC I get cryptic errors:

undefined reference to "vtable for class name"

Unless it is caused by a missing library, this not-so-descriptive error message always forces me to dig through the code files in turn to find the missing implementation for the virtual function. Is there a way to get the linker to tell me which virtual function it is missing, maybe a flag or something else? Or maybe he is telling me, but I do not understand what he is saying?

+5
source share
1 answer

From gcc faq :

++ , , undefined,

ISO ++ , , , , [Class.virtual]/8. , GCC , , , - .

, , . , , , , .

, , , . , , pure-virtual [class.dtor]/7.

, , - . .

+2

All Articles