Windows环境下MSYS2的pkg-config无法找到gtk4包的问题排查
问题:Windows Shell中调用pkg-config无法找到GTK4,优先调用devkitPro版本
已安装MSYS2,在其MINGW64 shell中成功安装pkg-config与gtk4,执行命令:
pkg-config --modversion gtk4运行正常。
在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 Shell优先调用devkitPro安装的pkg-config版本,而非MSYS2 MINGW64下的对应版本。
内容的提问来源于stack exchange,提问作者M Qwadezo
相关产品推荐
相关产品推荐

