This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Switching between interfaces without knowing derived object.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]