Finding Libraries using pkg-config in Windows
Asked Answered
D

1

7

I am, trying to find the gstreamer lib in windows (msvc) using pkg-config

pkg-config gstreamer-0.10 --cflags --libs

but i am getting any result like this

Package gstreamer-0.10 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-0.10.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-0.10' found

a .pc like is created when a library is installed (automatically through the use of an RPM, deb, or other binary packaging system or by compiling from the source).I can't find the .pc file in my gstreamer directory.

Should i just create a .pc file with all the necessary details.

prefix=C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.7
exec_prefix=${prefix}
libdir=${exec_prefix}\lib
includedir=${prefix}\sdk\include\gstreamer-0.10
toolsdir=${exec_prefix}\bin
pluginsdir=${exec_prefix}\lib\gstreamer-0.10
datarootdir=${prefix}\share
datadir=${datarootdir}
girdir=${datadir}/gir-1.0
typelibdir=${libdir}/girepository-1.0

Name: GStreamer
Description: Streaming media framework
Requires: glib-2.0, gobject-2.0, gmodule-no-export-2.0, gthread-2.0, libxml-2.0
Version: 0.10.35
Libs: -L${libdir} -lgstreamer-0.10
Cflags: -I${includedir}

or there is any other way to do this or Am i missing somthing?

Hope you can help.Thankz for taking the time to read the problem.

Well i am doing this to find solution why i am getting not found message in my waf configure for gstreamer

conf.check_cfg(atleast_pkgconfig_version='0.0.0') 
conf.check_cfg(package='gstreamer-0.10', uselib_store='GSTREAMER', args='--cflags --libs', mandatory=True)

the code works in linux and is supposed to work in windows too.


ADDED LATER

Well making the .pc and setting a path of the .pc dir to the PKG_CONFIG_PATH environment variable does the trick.Its not hard do it

Check out this out. Thankz for readings and helping me..:)

Donielle answered 30/5, 2012 at 5:5 Comment(5)
that's mean.i just want to know how to find certain lib in windows using pkconfig.Donielle
well, is it installed? mingw or cygwin? where is it installed? Try configure --helpAscender
@Ascender thankz for replying .pk-config is installed and working. I have add a variable PKG_CONFIG_PATH in Environment and created some .pc file in the path dir called gstreamer-0.10.pc.Donielle
How did you install gstreamer - pkg_config only makes sense if a Unixy install process is doneDamaging
@Mark i complied gstreamer from src. code.google.com/p/ossbuild. Well i didn't find any other way and i had to make pc file for it.:(...but it is working properly..:)Donielle
F
3

pkg-config is a great tool but unfortunately on Windows (vs. UNIX) there is no standard executable PATH or PKG_CONFIG_PATH.

While you can revert to defining options --with-gstreamer-include-dir ... --with-gstreamer-lib-dir ... and avoid the pkg-config dependency, you can also use --pkgconfig-exe c:\path\to\pkg-config.exe --pkgconfig-path c:\path\to\gstreamer;c:\path\to\otherlib, which will help having a good-looking wscript, especially when using a lot of pkg-config libs.

The typical Win32 user may have issues setting PKG_CONFIG_PATH and PATH directly or stumbling onto a cryptic "not found" error and then checking config.log.

If you do add the windows-specific pkg-config options, it might be interesting for everybody. You could write a pkgconfig_opts tool and submit it as a waf extra.

Feeling answered 17/6, 2012 at 16:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.