PKCONFIG does not work with Qt - Trying to link QtGStreamer-1.0
-
wrote on 8 Jul 2015, 08:23 last edited by A Former User
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:
CONFIG+=link_pkgconfig
PKGCONFIG+=QtGStreamer-1.0And when I run
pkg-config --libs Qt5GStreamer-1.0
gives this output:-lQt5GStreamer-1.0 -lQt5GLib-2.0 -lQt5Core
and
pkg-config --cflags Qt5GStreamer-1.0
gives 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
- Lars
EDIT:
I have also tried, to added the following, to the project file instead of pkg-config:INCLUDEPATH +=
pkg-config --cflags Qt5GStreamer-1.0
LIBS +=pkg-config --libs Qt5GStreamer-1.0
Also to no avail
-
wrote on 8 Jul 2015, 11:03 last edited by
Did dyou install the -devel package: qt-gstreamer-devel or qt5-gstreamer-devel?
-
Did dyou install the -devel package: qt-gstreamer-devel or qt5-gstreamer-devel?
wrote on 8 Jul 2015, 11:33 last edited by@Huulivoide Yes I have installed both
-
wrote on 8 Jul 2015, 20:55 last edited by Huulivoide 7 Aug 2015, 20:55
Did you notice you have
QtGStreamer-1.0
in the .pro file but
Qt5GStreamer-1.0
in your commandline commands.Do other libraries work with PKGCONFIG field?
-
Did you notice you have
QtGStreamer-1.0
in the .pro file but
Qt5GStreamer-1.0
in your commandline commands.Do other libraries work with PKGCONFIG field?
wrote on 9 Jul 2015, 06:12 last edited by@Huulivoide sorry my bad, it is because I have tried with both Qt and Qt5, and yes other libraries work.
-
wrote on 9 Jul 2015, 11:35 last edited by
reply I am using INCLUDEPATH now :) So not solved, but I found a work around
-
wrote on 20 Jul 2015, 21:00 last edited by
@tools
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/qt5Thank you
-
wrote on 8 Feb 2016, 04:51 last edited by Manoj_Sahu 2 Aug 2016, 12:54
@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 -
wrote on 29 May 2016, 21:58 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.