我使用的是 ubuntu 12.10。我有 CODE:Blocks IDE。 我想使用 gtk+,但是当我创建一个项目并构建它时,它说找不到 gtk.h 文件。
我通过写的方式下载了gtk+、glib、pango、gdk-pixbuf和atk
git clone git://git.gnome.org/gtk+,
git clone git://git.gnome.org/glib
...
然后我解压缩了所有库。一切都很好,直到这里。
要安装 gtk+,我写“./configure --prefix=/opt/gtk” 它开始处理,大部分过程都正常,但随后出现错误
...
checking for some Win32 platform... no
checking whether build environment is sane... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for BASE_DEPENDENCIES... no
configure: error: Package requirements (glib-2.0 >= 2.33.1 atk >= 2.5.3 pango >= 1.30.0 cairo >= 1.10.0 cairo-gobject >= 1.10.0 gdk-pixbuf-2.0 >= 2.26.0) were not met:
No package 'glib-2.0' found
No package 'atk' found
No package 'pango' found
No package 'cairo' found
No package 'cairo-gobject' found
No package 'gdk-pixbuf-2.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS
and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
我试图通过在它们的目录中写入 ./configure 来安装其他库。但它无法归档配置文件。
我设置了 PKG_CONFIG_PATH
但它无论如何都不起作用
如何安装?
最佳答案
你应该使用:apt-get install libgtk2.0-dev
关于linux - GTK+ 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14560374/