Important: Please read the Qt Code of Conduct -

Qt5 - QtMultimedia Include Errors

  • Hi!

    I am trying to run some of the new QtMultimedia examples included in Qt5.

    When I try them in QtCreator they all can be build successfully, but I get the "service not found error" I described here:

    Then I tried them in VS2010 but there they all don't work. I included QtMultimedia in the project settings but get the error:

    c:\qtsdk_5\5.0.0-beta2\msvc2010\include\qtmultimedia\qmediaobject.h(48): fatal error C1083: Cannot open include file: 'qtmultimediadefs.h': No such file or directory

    This happens if I just include for example <QtMultimedia\QMediaPlayer> in an empty project like this:

    @#include <QtMultimedia\qmediaplayer.h>
    int main(int argc, char *argv[])
    return 0;

    Tested on WinXP and Win8
    QtCreator 2.6
    Qt5 beta2

  • Moderators

    Add this line to your project (.pro) file, to include the Qt Multimedia module:

    QT += multimedia

    The same applies for other modules. For example, if you want the Qt Network and Qt SQL module, you'll add something like
    QT += network sql

  • That's wat i did when I created the projects in QtCreator.

    In VS2010 I included the QtMultimedia libs in the project settings at the beginning, but it seems that the multimedia library can't be found, because I have to add for example

    #include <QtMultimedia\QMediaPlayer>

    manually inside the example files..

  • Moderators

    That's interesting. Which example did you try to build? I have VS2010, and it built the Video Widget example fine (However, the program doesn't run properly... same issue as )

    Also, did you update your MSVS? I followed the upgrade steps at

Log in to reply