Qt5 & Windows 8, compile error in qtmultimedia module.

  • Hello,

    I currently try to compile Qt5 (git, master) in Windows 8 with Visual Studio 2012 C++ Express.

    This is my configure line:
    configure -developer-build -opensource -confirm-license -nomake tests -opengl es2 -angle -directwrite -mp

    I get the following error:

    @c:\qt\git-qt5\qtbase\include\qtcore../../src/corelib/global/qglobal.h(1052) : e
    rror C2825: 'T': must be a class or namespace when followed by '::'
    .\qdeclarativevideooutput.cpp(191) : see reference to function template
    instantiation 'T qt_dynamic_cast_check<QDeclarativeVideoRendererBackend*,QDeclar
    ativeVideoBackend*>(X,T *)' being compiled
    T=QDeclarativeVideoRendererBackend *,
    X=QDeclarativeVideoBackend *
    c:\qt\git-qt5\qtbase\include\qtcore../../src/corelib/global/qglobal.h(1052) : e
    rror C2039: 'dynamic_cast_will_always_fail_because_rtti_is_disabled' : is not a
    member of '`global namespace''
    c:\qt\git-qt5\qtbase\include\qtcore../../src/corelib/global/qglobal.h(1052) : e
    rror C2146: syntax error : missing ';' before identifier 'dynamic_cast_will_alwa
    c:\qt\git-qt5\qtbase\include\qtcore../../src/corelib/global/qglobal.h(1052) : e
    rror C2275: 'T' : illegal use of this type as an expression
    .\qdeclarativevideooutput.cpp(191) : see declaration of 'T'
    c:\qt\git-qt5\qtbase\include\qtcore../../src/corelib/global/qglobal.h(1052) : e
    rror C2065: 'dynamic_cast_will_always_fail_because_rtti_is_disabled' : undeclare
    d identifier
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
    \VC\BIN\cl.EXE"' : return code '0x2'
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
    \VC\BIN\nmake.exe"' : return code '0x2'

    I'm confused by error C2039: 'dynamic_cast_will_always_fail_because_rtti_is_disabled' : is not a
    member of '`global namespace''
    since i thought that Rtti should be enabled by default...

    Anyway, can someone help me?

    Best Regards,


  • Hello,

    I did comment out the following line (191)

    Q_ASSERT(m_backend && dynamic_cast<QDeclarativeVideoRendererBackend *>(m_backend.data()));

    -> //Q_ASSERT(m_backend && dynamic_cast<QDeclarativeVideoRendererBackend *>(m_backend.data()));

    It now goes over and keeps compiling. I'm not sure whats causing the compile issue,..

    Similar issue with ... qtmultimedia\src\plugins\wmf\player\mfvideorenderercontrol.cpp:2178

    QChildEvent childEvent = dynamic_cast<QChildEvent>(event);
    -> QChildEvent childEvent = (QChildEvent)event;

  • Moderators

    Check C:[QT 5 ROOT]\qtbase\config.summary

    Is RTTI supported in your configuration?

  • Moderators

    I just read your original message again, and realized that the error isn't because you have RTTI disabled. It's because the compiler can't find a function/template/variable named `dynamic_cast_will_always_fail_because_rtti_is_disabled'

    Search for that name in the source code; you might be able to find some clues

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.