无法在Windows上编译GStreamer,因为它缺少Glib-2.0 [英] Cannot compile gstreamer on Windows because it is missing glib-2.0

查看:16
本文介绍了无法在Windows上编译GStreamer,因为它缺少Glib-2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个在Windows上实现GStreamer的Rust程序,但我不知道如何正确地处理依赖关系。我一直收到此错误:

--- stderr
`"pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.42"` did not exit successfully: exit code: 1
--- stderr
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found

Process finished with exit code 101

以下是我在Cargo.toml中的依赖项:

[dependencies]
gstreamer = "0.16.1"

我通过巧克力pkgconfiglite安装了pkg-config。我不知道如何克服这个错误,我被难住了。

推荐答案

您需要将C:gstreamer1.0x86_64libpkgconfig添加到PKG_CONFIG_PATH,以便pkg-config可以找到GStreamer的.pc文件。

(将发问者问题的实际解决方案从备注移至此处。行下方的原始答案,以便注释有意义。)


根据the gstreamer-rs README

pacman -S mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-plugins-base 
      mingw-w64-x86_64-gst-plugins-good mingw-w64-x86_64-gst-plugins-bad 
      mingw-w64-x86_64-gst-plugins-ugly mingw-w64-x86_64-gst-libav 
      mingw-w64-x86_64-gst-rtsp-server

自述文件提到了pkg-config的问题并建议pkg-config-lite,但您似乎已经有了问题,所以不应该是问题。

Chocolatey gstreamer-devel package可能会有类似的结果,但它不是(显然)官方方法。

这篇关于无法在Windows上编译GStreamer,因为它缺少Glib-2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆