gpt4 book ai didi

windows - 由于缺少glib-2.0,因此无法在Windows上编译gstreamer

转载 作者:行者123 更新时间:2023-12-03 11:45:08 49 4
gpt4 key购买 nike

我正在尝试构建一个在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"
我通过Chocolatey pkgconfiglite安装了pkg-config。我不知道如何克服这个错误,我很困惑。

最佳答案

您需要在C:\gstreamer\1.0\x86_64\lib\pkgconfig中添加PKG_CONFIG_PATH,以便pkg-config可以找到GStreamer的.pc文件。
(在此处从注释中移动了对asker问题的实际解决方案。该行下面的原始答案,这样注释才有意义。)

根据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 - 由于缺少glib-2.0,因此无法在Windows上编译gstreamer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63026758/

49 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com