"在pkg-config搜索路径中没有找到包"。但实际上是有的

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

我在使用MinSYS2,我已经安装了这个包。https:/packages.msys2.orgpackagemingw-w64-i686-gimp?repo=mingw32。

pacman -S mingw32/mingw-w64-i686-gimp

现在如果我运行 gimptool-2.0 --cflags --libs 返回。

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

奇怪的是,gimpui-2.0.pc实际上是在系统中的,在文件夹里。\mingw32\lib\pkgconfig. 这个文件夹是正确的PKG_CONFIG_PATH变量的一部分。

$ echo $PKG_CONFIG_PATH
/mingw32/lib/pkgconfig:/mingw32/share/pkgconfig

gimpui-2.0.pc的内容。

prefix=/mingw32
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: GIMP UI
Description: GIMP User Interface Library
Version: 2.10.10
Requires: gimp-2.0 >= 2.10 gtk+-2.0 >= 2.24.32
Libs: -L${libdir} -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-2.0
Cflags: -I${includedir}/gimp-2.0

如何解决?

windows unix mingw gimp pkg-config
1个回答
0
投票

我已经通过安装工具链解决了问题。https:/packages.msys2.orggroupmingw-w64-i686-toolchain。

© www.soinside.com 2019 - 2024. All rights reserved.