Runtime warning: Symbol [vtable] has different size in shared object, consider relinking

Jonathan Wakely jwakely.gcc@gmail.com
Wed Jan 8 08:57:00 GMT 2014


On Jan 7, 2014 11:06 PM, "Tyler Cardon" wrote:
>
> Does this mean that adding virtual method declarations (even without
> changing virtual method order) breaks the base class library's abi?

It is a violation of the C++ One Definition Rule, so undefined behaviour.

It will not behave correctly if you have a class that has CTest as a
(direct or indirect) base class and adds new virtual functions to the
vtable, because the new functions will be expected to appear in
different slots in the vtable depending on which version of the base
class has been seen.

You might find http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++
useful.



More information about the Gcc-help mailing list