Switching between interfaces without knowing derived object.
John (Eljay) Love-Jensen
eljay@adobe.com
Thu Aug 20 07:06:00 GMT 2009
Hi Hardeep,
Just a guess...
The cause of the problem *MAY* be that there may be multiple copies of the
RTTI information.
But the operator== of the RTTI information, as used by dynamic_cast, only
compares the pointers as being the same, it does not compare the RTTI
structure for equality.
If that is the issue, it may be fixed by making sure you have exported all
the relevant RTTI information, by decorating the classes with
__attribute__((visibility("default"))), or by using the -fvisibility=default
switch as a sweeping first-stab fix.
You may also need to make sure you are not using early binding.
HTH,
--Eljay
DISCLAIMER: I don't have Mandriva Linux release 2006 (although I was a big
Mandrake fan back in the day).
More information about the Gcc-help
mailing list