pkg-config没有找到gtk + -3.0

Modified on: Sat, 09 Jun 2018 13:24:53 +0800

在此声明未找到包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。

最佳答案

我只安装了普通的gtk3文件,而不是cmake使用的开发文件:

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

相关问答

添加新评论