QtMultimedia Issue



  • Hi Everyone,
    I am using version of Qt5 and Ubuntu 16.04. I searched on the Internet and this website and I've got nothing.
    The error that I've got when I build the program is :

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

    I've already install these libraries :

    • libqt5multimedia5 - Qt 5 Multimedia module
    • libqt5multimedia5-plugins - Qt 5 Multimedia module plugins
    • libqt5multimediaquick-p5 - Qt 5 Multimedia Quick module
    • libqt5multimediawidgets5 - Qt 5 Multimedia Widgets module
    • qtmultimedia5-dbg - Qt 5 Multimedia library debugging symbols
    • qtmultimedia5-dev - APIs for multimedia functionality - development files
    • qtmultimedia5-examples - Examples for Qt 5 Multimedia module
    • qtdeclarative5-qtmultimedia-plugin

    The errors still exist. I don't know how to solve that.
    If there is any suggestion, I'll be glad to know.

    Thanks in advance..



  • Did you add multimedia and multimediawidgets tot your pro-file?



  • @Jan-Willem said:

    Did you add multimedia and multimediawidgets tot your pro-file?

    Do you mean ?

    QT += multimedia
    QT += multimediawidgets
    LIBS += -lQtMultiMedia -lQtMultiMediaWidgets
    

    These are in my current pro-file.



  • just remove the line LIBS += -lQtMultiMedia -lQtMultiMediaWidgets

    the problems comes from the fact that they are called Qt5Multimedia and Qt5MultimediaWidgets but it does not matter as QT += multimedia multimediawidgets will take care of the linking without adding anything else



  • @VRonin said:

    just remove the line LIBS += -lQtMultiMedia -lQtMultiMediaWidgets

    the problems comes from the fact that thet are called Qt5Multimedia and Qt5MultimediaWidgets but it does not matter as QT += multimedia multimediawidgets will take care of the linking without adding anything else

    I've just removed that line, but the error still exist.



  • make sure you rerun qmake. even better, clear the project and rebuild



  • You mean it still can not find QtMultimedia?
    Does QtCreator autocomplete on QtMultimedia-stuff?

    Perhaps you could run qmake and rebuild your project?



  • I have just solved the problem. I did as you said. The things were going fine, but the error was still exist. Therefore, I tried to find the source of the problem. In makefiles of the program what I am dealing with, the library links are referred as

    libQtMultimedia
    

    However, in my library location there is no library exactly the same name. There is :

    libQt5Multimedia
    

    So, I redefined it in makefile, and the problem is solved.

    Thanks for your helps..


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.