我正在使用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 来安装其他库,但无法找到 configure 文件。
我设置了 PKG_CONFIG_PATH
,但它仍然不起作用。
我该如何安装它?