Important: Please read the Qt Code of Conduct -

[SOLVED] Compiling the Qt 4.8.3 source with RTTI support for using the dynamic_cast

  • Hi,

    I've compiled the Qt 4.8.3 from source with these instructions and flags:

    configure -platform win32-g++ -debug-and-release -rtti -exceptions -no-phonon -no-phonon-backend -fast -opensource -shared -qt-sql-mysql -l mysql -I c:\mysql\include -L c:\mysql\lib\opt


    I used -rtti for enabling the dynamic_cast but I can't use it because I get error message when I want to link my program:

    I don't understand what is the problem. When I use the old Qt 4.8.0 from QtSDK, everything is OK.

    Any suggestion is welcomed.
    Thank you!

    Best regards

  • The solution:


    CONFIG += rtti

    into your .pro (project) file.

Log in to reply