Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Сan't use QtMultimedia in the project
Qt 6.11 is out! See what's new in the release blog

Сan't use QtMultimedia in the project

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 716 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    Samovolk
    wrote on last edited by aha_1980
    #1

    Hello all!
    I need to add the ability to work with mp3-files. To do this I specify #include <QMediaPlayer> in the project. But the project does not compile and displays the following error

    error: QMediaPlayer: No such file or directory
            #include <QMediaPlayer>
    

    If I create a new clean project and specify "multimedia" in the .pro file, i.e. it turns out this line

    QT + = core gui multimedia
    

    then if you build the project, then pop up this errors

    error: cannot find -lQtMultimedia
    error: collect2: error: ld returned 1 exit status
    

    All the solutions that I saw with QMediaPlayer did not help me. I can’t determine where the problem, so I need someone's help.

    jsulmJ 1 Reply Last reply
    0
    • S Samovolk

      Hello all!
      I need to add the ability to work with mp3-files. To do this I specify #include <QMediaPlayer> in the project. But the project does not compile and displays the following error

      error: QMediaPlayer: No such file or directory
              #include <QMediaPlayer>
      

      If I create a new clean project and specify "multimedia" in the .pro file, i.e. it turns out this line

      QT + = core gui multimedia
      

      then if you build the project, then pop up this errors

      error: cannot find -lQtMultimedia
      error: collect2: error: ld returned 1 exit status
      

      All the solutions that I saw with QMediaPlayer did not help me. I can’t determine where the problem, so I need someone's help.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Samovolk How did you install Qt and which version?
      On which OS?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • S Offline
        S Offline
        Samovolk
        wrote on last edited by
        #3

        Oh, I definitely forgot it. OS - debian 9.
        Installation was done through Synaptic. Installed: qt-sdk and qtcreator. Everything else was installed automatically. Qt version is 4.8.7.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          AFAIR, QtMultimedia is a Qt 5 module.

          In any case, unless you have strict constraints, you should pass to Qt 5.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          S 1 Reply Last reply
          1
          • SGaistS SGaist

            Hi,

            AFAIR, QtMultimedia is a Qt 5 module.

            In any case, unless you have strict constraints, you should pass to Qt 5.

            S Offline
            S Offline
            Samovolk
            wrote on last edited by
            #5

            @SGaist
            I knew it. Google confused me and I thought that the problem is not in the version. Updated to version 5 and it worked.
            Thanks for help.

            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