pkg-config 在使用 MSYS2 的 Windows 上找不到软件包

问题描述 投票:0回答:0

我安装了 MSYS2,并在 MSYS2 (MINGW64) shell 内安装了 pkg-config 和 gtk4。当我运行命令时

pkg-config --modversion gtk4

在 MSYS2 shell 内,一切正常。但是当我在 Windows shell 中运行完全相同的命令时,我收到了以下错误消息:

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

然后我尝试摆弄 PKG_CONFIG_PATH 环境变量,但这没有任何作用。然后我就尝试了

where pkg-config

得到了这个:

d:\devkitPro\msys2\usr\bin\pkg-config.exe
D:\msys64\mingw64\bin\pkg-config.exe

注意到什么奇怪的事情了吗? Windows 没有运行与我在 MSYS2 中使用的相同的

pkg-config
,而是运行 devkitPro 的安装。

cmd mingw-w64 msys2 pkg-config
© www.soinside.com 2019 - 2024. All rights reserved.