Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
error: cannot find -lpulse-mainloop-glib
I am trying to run a multimedia example and after I add multimedia and multimediawidgets to the pro file I do a build and get the above message. I am running Linux Mint and I assume that I am missing some libraries. What are they and where do I find then?
All the messages are:
:-1: error: cannot find -lpulse-mainloop-glib
:-1: error: cannot find -lpulse
:-1: error: cannot find -lglib-2.0
:-1: error: collect2: error: ld returned 1 exit status
Looks like you are missing the development packages matching these libraries. Use the package manager of your distribution to find them.
I see from my search that you have seen this problem before. In searching the Package Manager for Mint I found:
Do I need one or both or am I barking up the wrong tree?
Let me update my previous message. I installed Qtstreamer-plugins-qt5 and Libqt5gstreamer-dev. Then I saw Libpulse-mainloop-glib0; however, I did not install it because it removed a number of packages and in my experience that is bad and you should proceed ONLY if you know what you are doing--I do not. I specifically mentions packages of Mint Cinnamon, which is the version that I am running.
Now I have three questions: 1. Should I install Libpulse-mainloop-glib0? 2. Are there other packages that I should install? 3. Is there a Linux that is better suited to running Qt? I have been happy with Mint, it has performed flawlessly up to trying VideoWidget and it is much faster that Windows 10--why is the Qt on Windows 10 that does not use Visual Studio so slow? and is the VS version faster?
All in all, you can also use the Qt version provided by meant to do development unless you need some bug fix or feature from a more recent version of Qt.
- It really depends on what you need for your application.
- I don't know since I don't know what your application does and why it might or might not need that library.
- Not really, all distributions have their pros and cons
- Since I don't know what your application does, I can't comment.
@SGaist Thanks. There is no specific application, just wanted to see how to use QViewWidget and how it performed. It worked on Windows 10. This seems to be a Linux Mint problem, so I will close out this post.
QVideoWidget is what I meant. I would like to know if anyone using Linux Mint has successfully used QVideoWidget and what they did to get it to work.
How are you using it ?
First, I want to understand how to use the multimedia classes. Then I want to explore video editing.
This is the first program that I tried (which runs fine on Windows 10, but gave the cited errors on Linux Mint); you can see that it is very simple:
int main(int argc, char *argv)
QApplication a(argc, argv);
QMediaPlayer* player = new QMediaPlayer; QVideoWidget* vw = new QVideoWidget; player->setVideoOutput(vw); player->setMedia(QUrl::fromLocalFile("/home/Videos/Pendulum Waves.mp4")); vw->setGeometry(100, 100, 600,600); vw->show(); player->play(); return a.exec();
It would appear that Qt expects a library to be available, namely; the package Libpulse-mainloop-glib0. However, because the installation of that package causes the removal of some Cinnamon packages I was hesitant to install it because of the unknown consequences. I was hopping to find a Linux Mint user that had used QVideoWidget to tell me how they got it to work. I have also posted on the Mint forum to see if installing the package will turn my computer into a space heater.
However, my ultimate application is to develop a follow-on to Smalltalk, which I call Domaintalk. While the main domain would use a Smalltalk-like language for the main program logic and there would be other domains that would use the natural language of the domain experts. For example, instead of programming mathematical equations in some programming language code, which generally results in butchered code. In the math domain the mathematical equations would be just that. SQL would be written a SQL in the SQL domain. Etc.
Maybe Domaintalk could be used as another language binding in Qt, as is done with PyQt. I was introduced to Qt by Ebe, the Intel Assembly IDE. Its cross platform capabilities made me take a closer look. That is why I want to know why I am having a problem with such a simple program.
Is there a document that lists the incompatibilities with the different Linus distros, Mac and Windows?
I hope that this will help you.
The platform notes of the Qt Multimedia documentation will give you some more information.
Note that .mp4 is not an free format so you may need additional codecs/plugins. Qt relies on the platform provided infrastructure with each having its own shortcomings.
If you're only interested in playing multimedia files, then a project like VLC-Qt might be more interesting.