[Spice-devel] [PATCH spice-gtk] buildsys: Don't link glib-compat.o into libspice-client-gtk.so
Hans de Goede
hdegoede at redhat.com
Fri Feb 24 07:22:45 PST 2012
glib-compat.c was added to SPICE_GTK_SOURCES_COMMON since with the
new SpiceUsbDeviceWidget libspice-client-gtk now also uses G_TYPE_ERROR
and when compiling with an older glib this gets defined in glib-compat.o
However doing this turns out to be a very BAD idea, since having
glib-compat.o linked into 2 different libraries, each defining there
own private spice_error_get_type, leads to the "GError" type getting
registered twice with glib, which it does not like.
So instead of linking glib-compat into 2 different libraries, put it only
in libspice-client-glib and export spice_error_get_type from
libspice-client-glib (this is ofcourse intended for libspice-client-gtk
private use only).
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
gtk/Makefile.am | 1 -
gtk/map-file | 1 +
2 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 7b2211d..29c7fb5 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -102,7 +102,6 @@ SPICE_GTK_LIBADD_COMMON = \
$(NULL)
SPICE_GTK_SOURCES_COMMON = \
- glib-compat.c \
glib-compat.h \
spice-gtk-session.c \
spice-gtk-session-priv.h \
diff --git a/gtk/map-file b/gtk/map-file
index 81cd682..32ead37 100644
--- a/gtk/map-file
+++ b/gtk/map-file
@@ -27,6 +27,7 @@ spice_display_new;
spice_display_paste_from_guest;
spice_display_send_keys;
spice_display_set_grab_keys;
+spice_error_get_type;
spice_get_option_group;
spice_grab_sequence_as_string;
spice_grab_sequence_copy;
--
1.7.7.6
More information about the Spice-devel
mailing list