Qt multimedia: cannot find -lpulse - qt

I modified .pro:
QT += core gui multimedia multimediawidgets
And I include <QMediaPlayer>, <QVideoWidgets> in main.cpp
Then I tried to build. It gives me following errors:
cannot find -lpulse-mainloop-glib
cannot find -lpulse
collect2:error:ld returned 1 exit status
Can anyone help me? My system is Ubuntu 16.04 LTS.

Try sudo apt-get install libpulse-dev
From http://www.qtcentre.org/threads/50938-QT-error-usr-bin-ld-cannot-find-lpulse-mainloop-glib:
From: norobro
Default Re: QT error /usr/bin/ld: cannot find -lpulse-mainloop-glib
On my Debian box that lib is in the libpulse-dev package. Do you have it installed?

Related

Cannot find serial port support in Qt 6.3.2

For some reason I should use Qt6 for my project. I need serial port functionality but Qt Creator cannot find corresponding module. The following error is raised:
Project ERROR: Unknown module(s) in QT: serialport. My .pro file includes serialport - it seems to me that the problem is in the absence of this module. Also I don't corresponding examples projects.
I tried to install libqt5serialport5 and libqt5serialport5-dev using commands:
sudo apt-get install libqt5serialport5
sudo apt-get install libqt5serialport5-dev
but it didn't help. Please explain how to add serial port module to my Qt6 installation.
Below is information about my installation:
Qt Creator 8.0.2
Based on Qt 6.3.2 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), x86_64)
This problem has been solved very simple. Use Qt MaintenanceTool using which allows remove/update or install modules.

Unable to download Gstreamer package for RHEL 3.10 kernel, cannot use QWebView

I have a QT application that uses QWebView. On RHEL7 with 3.10 kernel I am getting following error:
/usr/bin/ld: cannot find -lgstapp-0.10
/usr/bin/ld: cannot find -lgstinterfaces-0.10
/usr/bin/ld: cannot find -lgstpbutils-0.10
/usr/bin/ld: cannot find -lgstvideo-0.10
/usr/bin/ld: cannot find -lgstbase-0.10
/usr/bin/ld: cannot find -lgstreamer-0.10
On Ubuntu I dowloaded sudo apt-get install libgstreamer-plugins-base0.10-dev and it works fine.
On RHEL I have tried following packages but still getting the error:
yum install gstreamer1-devel
yum install gstreamer1-plugins-base-devel
gstreamer010-0.10.13-3.4.x86_64.rpm
gstreamer-plugins-ugly-0.10.19-17.el7.nux.src.rpm
rpm -qa | grep gstreamer this command gives following packages:
gstreamer1-plugins-bad-free-1.0.7-4.el7.x86_64
gstreamer1-1.4.5-1.el7.x86_64
gstreamer-tools-0.10.36-7.el7.x86_64
gstreamer1-plugins-base-1.4.5-2.el7.x86_64
gstreamer1-plugins-good-1.0.7-5.el7.x86_64
gstreamer1-devel-1.4.5-1.el7.x86_64
gstreamer-0.10.36-7.el7.x86_64
gstreamer1-plugins-base-devel-1.4.5-2.el7.x86_64
I had some problems with gstreamer and plugins on debian. Linking was fine, but video player didn't show video with error that I have no required plugins. Finally I've installed packeges from ubuntu launchpad.
As I understand Qt uses 0.10 version of gstreamer and plugins, so installing gstreamer 1.0 won't help. Since you use RHEL I guess the only way is to compile required packages by yourself. You can find sources here:

Self-compile Qt Webkit

I have self-compiled Qt 5.4.1 and installed in /opt/qt-5.4.1.
However, I encountered an error while trying to 'qmake' my project file:
Project ERROR: Unknown module(s) in QT: webkitwidgets
I did sudo apt-get install libqt5webkit5-dev but the error persists.
I suspect then that apt-get install does not work when Qt-Core was self-compiled. The Qt Webkit source is available on https://qt.gitorious.org/qt
The question is, how and where should I install Webkit from source so that it can be detected while running qmake?
Probably you missed compilation of webkit while compilation of Qt. Read here how to resolve this issue:
https://forum.qt.io/topic/40378/solved-linux-unknown-module-s-in-qt-webkitwidgets
QtWebKit is not built anymore by default. You can build it after you have a proper build of Qt. Once you have your build of Qt clone the QtWebKit repo:
git clone https://github.com/qt/qtwebkit.git
then, make a new dir for the build files and from that directory enter the command:
/opt/qt-5.4.1/bin/qmake <path/to/qtwebkit>
make -j<n>
make install
Now you should be able to use QtWebKit with your build.
might want to try:
sudo apt-get install libqt5webkit5
and
sudo apt-get install libqt5webkit5-dev

Unknown module(s) in QT: svg

Added QT += svg and I tried just QT += svg and greaterThan(QT_MAJOR_VERSION, 4): QT += svg to the .pro solution file and ran qmake from inside the QtCreator and got this error:
error: Unknown module(s) in QT: svg
Any ideas?
You are lacking the installation of the the QtSvg library. Try to install them on your Ubuntu 13.10 in the following way:
sudo apt-get install libqt5svg5*
Debian Stretch:
sudo apt install libqt5svg5-dev
Fedora (courtesy of #robin-green):
sudo dnf install qt5-qtsvg-devel
Because zsh complains to me about "no matches found" when using lpapp's answer, I would like to add here:
On Debian Systems one can get the required library for release builds via:
sudo apt install libqt5svg5
and if one also wants to build a debug build one requires:
sudo apt install libqt5svg5-dev
additionally.

Compiling Qt 4.8.3 on Ubuntu 12 failing

I am new to Ubuntu and i am getting a message while building Qt 4.8.3 on Ubuntu 12:
Basic XLib functionality test failed! You might need to modify the
include and library search paths by editing QMAKE_INCDIR_X11 and
QMAKE_LIBDIR_X11 in
/home/majidmax/qt-everywhere-opensource-src-4.8.3/mkspecs/linux-g++.
what the proper steps to build Qt on Ubuntu?
http://qt-project.org/doc/qt-4.8/requirements-x11.html
the website provide the package list which must be installed
try it~
These are the packages you need to install and you'll be good to go. I just had this same problem and this worked for me. These came from the link provided by Garlic Tseng in the accepted answer. I am just putting these here for convenience:
libfontconfig1-dev
libfreetype6-dev
libx11-dev
libxcursor-dev
libxext-dev
libxfixes-dev
libxft-dev
libxi-dev
libxrandr-dev
libxrender-dev
One (copy pastable) command to install all:
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev
What about sudo apt-get build-dep qt4-qmake?
Try to run that command before you compile Qt (on Debian-like distros).
Same problem i faced in fedora20 (64-bit) for Qt-4.8.3
1)- yum install libXext-devel
(internet connectivity should be there for checking the dependency and install all dependency).
2)- ./configure
3)- make
4)- make install
5)- Installation finish successfully.
The error message doesn't give a lot of information as to the actual issue of XLib failing.
To get more information on the error causing it to fail you can 'make' the xlib tests:
$ cd <Qt_Source_Directory>/config.tests/x11/xlib/
$ make
g++ -Wl,-O1 -o xlib xlib.o -L/usr/X11R6/lib -ltcg -lXext -lX11 -lm
/usr/bin/ld: cannot find -ltcg
collect2: error: ld returned 1 exit status
make: *** [xlib] Error 1
In my case above, I was using -ltcg which was being interpreted as an explicit library to include. I was using this option as it is listed on the qt 4.8 configure options as:
Use Link Time Code Generation
When I looked at the configure options using ./configure --help I noticed that this option isn't listed. Removing the option from my configure line fixed my issue.
what the proper steps to build Qt on Ubuntu?
Check the Qt supported Platforms.
Check Qt for X11 requirements.
3a. Check steps to install Qt on X11 platforms(along with build).
or
3b. Check steps to build static Qt.

Resources