PDA

View Full Version : FlickCharm and dynamic_cast_will_always_fail_because_rtti_is_disa bled error



lyhoanghai
30th September 2010, 14:52
Hello,
When I try to convert QT application which use FlickCharm to Visual Studio so that I can build it for Windows Mobile.

For each dynamic_cast statement within FlickCharm there is an error:
Ex: "QMouseEvent *mouseEvent = dynamic_cast<QMouseEvent*>(event);"

I have error C2039: 'dynamic_cast_will_always_fail_because_rtti_is_dis abled' : is not a member of '`global namespace''

Do you have any idea how to solve this error?
It seems that dynamic_cast is not supported by QT. Is it correct ?

Thanks

Hai

tbscope
30th September 2010, 14:58
It means that there is no runtime type information available.
http://en.wikipedia.org/wiki/Run-time_type_information

Dynamic casting is supported by Qt, except when there is no rtti.

Edit: You need to enable rtti in Visual Studio.