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. Cannot find -lQt5Multimedia
QtWS25 Last Chance

Cannot find -lQt5Multimedia

Scheduled Pinned Locked Moved General and Desktop
multimediawidgetldlibrarypath
4 Posts 3 Posters 5.2k 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
    VictorLamoine
    wrote on last edited by VictorLamoine
    #1

    Hello,

    I'm trying to get the Qt examples related to multimedia/video working.

    • Ubuntu 14.04
    • Qt Creator 3.4.1 and Qt 5.4.2 (GCC 4.6.1, 64 bit)

    I copied the examples from the installation path:
    cp -r /opt/Qt5.4.2/Examples/Qt-5.4/multimediawidgets/ ~/qt_examples

    I try to compile the videowidget example, I did not modify a single line in the project, here is the error:

    /usr/bin/ld: cannot find -lQt5Multimedia
    collect2: error: ld returned 1 exit status
    make: *** [videowidget] Error 1
    18:17:01: Le processus "/usr/bin/make" s'est terminé avec le code 2.
    Erreur lors de la compilation/déploiement du projet videowidget (kit : Desktop)
    When executing step "Make"
    

    Here are the libraries that I have:

    $ dpkg  -L libqt5multimedia5
    /.
    /usr
    /usr/lib
    /usr/lib/x86_64-linux-gnu
    /usr/lib/x86_64-linux-gnu/libQt5Multimedia.so.5.2.1
    diverted by libqt5multimedia5-touch to: /var/lib/libqt5multimedia5-touch-diverted/libQt5Multimedia.so.5.2.1.diverted-libqt5multimedia5-touch
    /usr/share
    /usr/share/doc
    /usr/share/doc/libqt5multimedia5
    /usr/share/doc/libqt5multimedia5/changelog.Debian.gz
    /usr/share/doc/libqt5multimedia5/copyright
    /usr/lib/x86_64-linux-gnu/libQt5Multimedia.so.5.2
    diverted by libqt5multimedia5-touch to: /var/lib/libqt5multimedia5-touch-diverted/libQt5Multimedia.so.5.2.diverted-libqt5multimedia5-touch
    /usr/lib/x86_64-linux-gnu/libQt5Multimedia.so.5
    diverted by libqt5multimedia5-touch to: /var/lib/libqt5multimedia5-touch-diverted/libQt5Multimedia.so.5.diverted-libqt5multimedia5-touch
    

    I tried to add INCLUDEPATH += /usr/lib/x86_64-linux-gnu/ in the .pro file, it doesn't change anything.
    How do I install Qt with multimedia support, or how do I get this example working?

    Bye

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mchinand
      wrote on last edited by
      #2

      Looks like it's trying to use your system's version of Qt instead of the one you have in /opt/Qt5.4.2. Is Qt 5.4.2 listed in QtCreator in Tools->Options->Build & Run? If not, add it and use the Build kit that uses this Qt version.

      1 Reply Last reply
      1
      • C Offline
        C Offline
        Colonel of Siberia
        wrote on last edited by Colonel of Siberia
        #3

        Hi.
        INCLUDEPATH need for your .h files.
        You can try add to your .pro file path to Qt libs:
        LIBS += -L /path_to_qt_libs/ -l lib_filename.so

        --
        Peace

        1 Reply Last reply
        0
        • V Offline
          V Offline
          VictorLamoine
          wrote on last edited by
          #4

          Thanks for your answers; the problem was indeed the default configuration, my mistake was trusting the information in the "About panel" of Qt Creator; you also have to make sure you have chosen Qt 5.4.2 as the default configuration, just like on the image below: (Tools > Options > Build & Run > Kits > Make the right one the default)
          Qt 5.4.2 configuration

          Now the compilation runs fine and the program launches.

          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