Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Qt5 - QtMultimedia Include Errors

    Installation and Deployment
    2
    4
    7953
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Vaido last edited by

      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: http://qt-project.org/forums/viewthread/22018/

      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;
      }@

      Configuration:
      Tested on WinXP and Win8
      QtCreator 2.6
      Qt5 beta2

      1 Reply Last reply Reply Quote 0
      • JKSH
        JKSH Moderators last edited by

        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
        @

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply Reply Quote 0
        • V
          Vaido last edited by

          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..

          1 Reply Last reply Reply Quote 0
          • JKSH
            JKSH Moderators last edited by

            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 http://qt-project.org/forums/viewthread/22024/ )

            Also, did you update your MSVS? I followed the upgrade steps at http://qt-project.org/wiki/Building-Qt-5-from-Git#aea23489ce3aa9b6406ebb28e0cda430

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply Reply Quote 0
            • First post
              Last post