Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved PKCONFIG does not work with Qt - Trying to link QtGStreamer-1.0

    General and Desktop
    qtgstreamer pkg-config
    5
    9
    5309
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tools 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.0

      And 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.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

      - 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

      1 Reply Last reply Reply Quote 0
      • H
        Huulivoide last edited by

        Did dyou install the -devel package: qt-gstreamer-devel or qt5-gstreamer-devel?

        T 1 Reply Last reply Reply Quote 0
        • T
          tools @Huulivoide last edited by

          @Huulivoide Yes I have installed both

          1 Reply Last reply Reply Quote 0
          • H
            Huulivoide last edited by Huulivoide

            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?

            T 1 Reply Last reply Reply Quote 0
            • T
              tools @Huulivoide last edited by

              @Huulivoide sorry my bad, it is because I have tried with both Qt and Qt5, and yes other libraries work.

              1 Reply Last reply Reply Quote 0
              • T
                tools last edited by

                reply I am using INCLUDEPATH now :) So not solved, but I found a work around

                C M 2 Replies Last reply Reply Quote 0
                • C
                  caiortp @tools 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/qt5

                  Thank you

                  1 Reply Last reply Reply Quote 0
                  • M
                    Manoj_Sahu @tools 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

                    1 Reply Last reply Reply Quote 0
                    • svbhvti
                      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.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post