qt + android + pkg-config: can not find gstreamer-android library
-
Hello.
I have a problem with my pkg-config and find libraries in general, but for an example, I will be using gstreamer-android. I get this error:Project ERROR: gstreamer-1.0 development package not found
My PKG_CONFIG_PATH is:
export PKG_CONFIG_PATH=/home/tools/tools/gstreamer-1.0-android-armv7-1.5.2/lib/pkgconfig:$PKG_CONFIG_PATH
And
pkg-config --libs gstreamer-1.0
returns-L/home/slomo/cerbero/dist/android_armv7/lib -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -lintl
.Also
pkg-config --cflags gstreamer-1.0
returns-pthread -I/home/slomo/cerbero/dist/android_armv7/include/gstreamer-1.0 -I/home/slomo/cerbero/dist/android_armv7/lib/gstreamer-1.0/include -I/home/slomo/cerbero/dist/android_armv7/include/glib-2.0 -I/home/slomo/cerbero/dist/android_armv7/lib/glib-2.0/include
and the project file is as so
TEMPLATE = app QT += qml quick widgets SOURCES += main.cpp RESOURCES += qml.qrc CONFIG += link_pkgconfig android{ PKGCONFIG += gstreamer-1.0 } # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = # Default rules for deployment. include(deployment.pri)
So from what I can tell that is correct but buiild with newst QT Creator for android-armv7 still returns:
Project ERROR: gstreamer-1.0 development package not found
Can some one tell me, what is wrong or give me a nudge in the right direction
- Lars
-
Where are you setting the PKG_CONFIG_PATH environment variable?
Does it work if you run qmake manually from the console? -
My pkg_config_path is set here and set in my .bashrc file
@tools said:My PKG_CONFIG_PATH is: `export PKG_CONFIG_PATH=/home/tools/tools/gstreamer-
what would qmake command look like?
I triede to copy the one from QT Creator:tools@steinwurf-124 build-qtgstreamer-Android_for_armeabi_GCC_4_9_Qt_5_5_0-Debug]$ /home/tools/Qt/5.5/android_armv7/bin/qmake -spec android-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug -o Makefile ../qtandroid/qtandroid.pro
but got this result:
sh: /opt/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: No such file or directory Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK. Could not read qmake configuration file /home/tools/Qt/5.5/android_armv7/mkspecs/android-g++/qmake.conf. Error processing project file: ../qtandroid/qtandroid.pro
I am new to QT and qmake so if I do anything wrong please inform me
- Lars
-
I'm not 100% sure but I think that .bashrc doesn't get sourced by xsessions and as so the
PKG_CONFIG_PATH doesn't get sourced into Qt Creator. To verify this you should set the
ANDROID_NDK_ROOT to point to the NDK root dir and try to rerun qmake from the console.
If that indeed does work, then it means it is a problem with .bashrc not getting sourced by
the X11-session. You might try setting it in .xsession and re-login after that to see if it works. -
@Huulivoide
With that set I get this output:[tools@steinwurf-124 build-qtandroid-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug]$ /home/tools/Qt/5.5/android_armv7/bin/qmake -spec android-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug -o Makefile ../qtandroid/qtandroid.pro Project ERROR: gstreamer-1.0 development package not found