我正在使用MinSYS2,并且已经安装了此软件包:https://packages.msys2.org/package/mingw-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
如何解决?