linux新手编译gtk+报错,请教各位!!急!!
本帖最后由 flamkuavos 于 2012-12-01 18:24:23 编辑 我刚开始摆弄openSUSE 12,新装的系统,自己安装了gcc和g++,然后下载编译gtk+2.24.0,我的步骤是这样的,在第8步骤报错,请教大家帮我看看,是不是我的编译过程有什么不当的地方?谢谢!
1、到gtk.org下载合适的稳定版本
2、解压
3、控制台下cd到解压目录,键入命令“./configure”,报错“No package glib”等等,gtk+有一堆的依赖包是openSUSE没有自带的,分别是glib、atk、pango等等
4、进入yast2图像界面,搜索glib发现有个glibc已经安装了,还不对喔,得搜索glib2-devel开头的都勾上,然后安装。第3步中提示缺少的包都可在yast2中安装,并且注意都得是devel包。
5、重来一次“./configure”,居然还报错*** libX11 not found,可yast2中明明已经安装了啊,还是devel版,网上说安装“libxext”的开发版就可以了(也有人说安装libxrender开发版),yast2下安装,重来一次,又报错cups-config present but cups/cups.h missing
6、安装网上提供的方法改用“./configure --disable-cups”,据gtk官方说明“--disable-cups and --enable-cups. By default the configure script will try to build the cups print backend if the cups libraries are found. These options can be used to explicitly control whether the cups print backend should be built.”所以去掉了cups
7、“make”,报错gdkdnd-x11.c:33: fatal error: X11/extensions/Xcomposite.h: No such file or directory,按网上提供的方法安装“libxcomposite”开发版
8、重新“make”,还是报错
/usr/lib/gcc/i586-suse-linux/4.7/../../../../i586-suse-linux/bin/ld: querymbol 'g_module_close'
/usr/lib/gcc/i586-suse-linux/4.7/../../../../i586-suse-linux/bin/ld: noteusr/lib/libgmodule-2.0.so.0 so try adding it to the linker command line
/usr/lib/libgmodule-2.0.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[4]: *** [gtk-query-immodules-2.0] Error 1
make[4]: Leaving directory `/home/admin/软件/gtk+-2.24.0/gtk'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/admin/软件/gtk+-2.24.0/gtk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/admin/软件/gtk+-2.24.0/gtk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/admin/软件/gtk+-2.24.0'
make: *** [all] Error 2
[解决办法]
我在fedora下按照缺少包的提示安装依赖后,没有报X11错误。。。