Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt5 - QtMultimedia Include Errors
QtWS25 Last Chance

Qt5 - QtMultimedia Include Errors

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 8.3k Views
  • 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 Offline
    V Offline
    Vaido
    wrote on last edited by
    #1

    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
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      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
      0
      • V Offline
        V Offline
        Vaido
        wrote on last edited by
        #3

        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
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          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
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved