Сan't use QtMultimedia in the project
Solved
General and Desktop
-
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 errorerror: 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.
-
Hi,
AFAIR, QtMultimedia is a Qt 5 module.
In any case, unless you have strict constraints, you should pass to Qt 5.