Unsolved PKCONFIG does not work with Qt - Trying to link QtGStreamer-1.0
Hey I am trying to developer a Qt Video player application, which will utilise Qt5Gstreamer.
But when I try to use PKGCONFIG, I get this output:
Project ERROR: QtGStreamer-1.0 development package not found
I have added the following to the .pro file:
And when I run
pkg-config --libs Qt5GStreamer-1.0gives this output:
-lQt5GStreamer-1.0 -lQt5GLib-2.0 -lQt5Core
pkg-config --cflags Qt5GStreamer-1.0gives this output:
/Qt5GStreamer -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/qt5/QtCore -I/usr/include/qt5
So from what I can tell, the environment, is setup as it should be. So can anyone tell me what is wrong?
I am using Fedora 21, if that helps.
Thanks in advance
I have also tried, to added the following, to the project file instead of pkg-config:
pkg-config --cflags Qt5GStreamer-1.0
pkg-config --libs Qt5GStreamer-1.0
Also to no avail
Huulivoide last edited by
Did dyou install the -devel package: qt-gstreamer-devel or qt5-gstreamer-devel?
@Huulivoide Yes I have installed both
Huulivoide last edited by Huulivoide
Did you notice you have
QtGStreamer-1.0in the .pro file but
Qt5GStreamer-1.0in your commandline commands.
Do other libraries work with PKGCONFIG field?
@Huulivoide sorry my bad, it is because I have tried with both Qt and Qt5, and yes other libraries work.
reply I am using INCLUDEPATH now :) So not solved, but I found a work around
I'm having the same problem
How do you did ? Do you add these lines?
CONFIG += link_pkgconfig
PKGCONFIG += Qt5GStreamer-1.0
INCLUDEPATH += -pthread -I/usr/local/include/Qt5GStreamer -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/qt5/QtCore -I/usr/include/qt5
Manoj_Sahu last edited by Manoj_Sahu
@tools Could you please share your work around?
I have added below include path but did not work.
INCLUDEPATH += pkg-config --cflags Qt5GStreamer-1.0
LIBS += pkg-config --libs Qt5GStreamer-1.0
svbhvti last edited by
I was having the same issue. I found that using the "LIBS" variable, instead of using:
"CONFIG += link_pkgconfig
PKGCONFIG += ..."
worked for me. So you put "LIBS += -lQt5GStreamer-1.0 -lQt5GStreamerUi-1.0" and whatever other libraries you need. If the library files are in an unusual place, you can use "LIBS += -L" followed by the directory. I'm not sure if it matters, but I'm using QMake version 3.0 and Qt Creator 4.0.0.