pkg-config 未找到 gtk+-3.0

pkg-config 未找到 gtk+-3.0

这里指出未找到包 gtk+-3.0:

karl@karl-ux303ln:~$ pkg-config --cflags gtk+-3.0
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found

但是我显然已经安装了 gtk3:

karl@karl-ux303ln:~$ dpkg -l libgtk* | grep -e '^i' | grep -e 'libgtk-*[0-9]'
ii  libgtk-3-0:amd64                            3.14.15-0ubuntu1~14.04~ricotz1                              amd64        GTK+ graphical user interface library
ii  libgtk-3-bin                                3.14.15-0ubuntu1~14.04~ricotz1                              amd64        programs for the GTK+ graphical user interface library
ii  libgtk-3-common                             3.14.15-0ubuntu1~14.04~ricotz1                              all          common files for the GTK+ graphical user interface library
ii  libgtk2.0-0:amd64                           2.24.23-0ubuntu1.3                                          amd64        GTK+ graphical user interface library
ii  libgtk2.0-bin                               2.24.23-0ubuntu1.3                                          amd64        programs for the GTK+ graphical user interface library
ii  libgtk2.0-common                            2.24.23-0ubuntu1.3                                          all          common files for the GTK+ graphical user interface library

但是我似乎找不到该文件gtk+-3.0.pc

karl@karl-ux303ln:~$ sudo find / -name "gtk+-3.0.pc"
karl@karl-ux303ln:~$ 

有什么想法吗?我正在尝试使用 cmake,但是它找不到 gtk3。

答案1

我只安装了普通的 gtk3 文件,没有安装 cmake 所需的开发文件:

sudo apt-get install build-essential libgtk-3-dev

相关内容