【发布时间】:2012-06-04 08:00:31
【问题描述】:
我正在尝试使用 pkg-config 在 windows (msvc) 中找到 gstreamer 库
pkg-config gstreamer-0.10 --cflags --libs
但是我得到了这样的结果
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
在安装库时会创建一个 .pc 之类的文件(通过使用 RPM、deb 或其他二进制打包系统或通过从源代码编译自动创建)。我在我的 gstreamer 中找不到 .pc 文件目录。
我应该只创建一个包含所有必要详细信息的 .pc 文件吗?
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}
或者还有其他方法可以做到这一点还是我错过了什么?
希望您能提供帮助。感谢您花时间阅读问题。
好吧,我这样做是为了找到解决方案,为什么我在为 gstreamer 配置的 waf 中收到 not found 消息
conf.check_cfg(atleast_pkgconfig_version='0.0.0')
conf.check_cfg(package='gstreamer-0.10', uselib_store='GSTREAMER', args='--cflags --libs', mandatory=True)
代码在 linux 中运行,应该也可以在 windows 中运行。
稍后添加
制作 .pc 并将 .pc 目录的路径设置为 PKG_CONFIG_PATH 环境变量就可以了。这并不难
签出this。感谢您阅读并帮助我..:)
【问题讨论】:
-
意思是。我只是想知道如何使用 pkconfig 在 Windows 中找到某些库。
-
嗯,安装了吗? mingw 还是 cygwin?它安装在哪里?试试
configure --help -
@sehe 感谢您回复 .pk-config 已安装并正常工作。我在 Environment 添加了一个变量 PKG_CONFIG_PATH 并在名为 gstreamer-0.10.pc 的路径目录中创建了一些 .pc 文件。
-
你是如何安装 gstreamer - pkg_config 仅在 Unixy 安装过程完成后才有意义
-
@Mark 我从 src 编译了 gstreamer。 code.google.com/p/ossbuild。好吧,我没有找到任何其他方法,我不得不为它制作 pc 文件。:(...但它工作正常..:)
标签: windows waf pkg-config