dynamic casts
A program that I ported to linux from windows is crashing due to dynamic casting. The program works fine on windows but when run on linux, any time a dynamic_cast is encountered, it crashes. Before I do the cast, the pointer is valid, but when I try to access the new object pointer thereafter, it fails every time!
If I change it to be a static_cast, everything is ok.
I have read that RTTI is automatically turned on for linux.
Has anyone seen this before or do you know what is happening.
Cheers, Dan.
|