2

在 Mac OSX 10.7.5 中编译gtk+-3.7.10并且总是出错:

In file included from gdkwindow.c:28:
/usr/local/include/cairo/cairo-gobject.h:183:3: error: #error Cairo was not compiled with support for GObject
gdkwindow.c: In function 'gdk_window_class_init':
gdkwindow.c:511: error: 'CAIRO_GOBJECT_TYPE_SURFACE' undeclared (first use in this function)
gdkwindow.c:511: error: (Each undeclared identifier is reported only once
gdkwindow.c:511: error: for each function it appears in.)
make[4]: *** [gdkwindow.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

我编译了 cairo 1.10:

./configure --prefix=/usr/local --enable-gobject=yes

但总是得到同样的错误。glib-2.35.8 也被编译。

有任何想法吗?

4

1 回答 1

1

您忽略了(重要的)第一个错误:

/usr/local/include/cairo/cairo-gobject.h:183:3: error: #error Cairo was not compiled with support for GObject

你说你已经在启用 GObject 的情况下编译了 Cairo,但是无论 Cairo GTK+ 正在编译什么都没有启用它。检查以确保您安装了 Cairo,并且其他版本的 Cairo 没有干扰。

于 2013-02-22T05:22:31.513 回答