Thursday, October 28, 2010

GLIB and wxWidget Class conflict

When compiling XaraLX, there is a conflict between GLIB-2.0 and  wxWidget 2.8 as shown below:

/usr/local/include/glib-2.0/gio/giotypes.h:127:47: error: conflicting declaration `typedef struct _GSocket GSocket'
/usr/include/wx-2.8/wx/unix/gsockunx.h:41:1: error: `class GSocket' has a previous declaration as `class GSocket'

The quick solution is to modify <XaraLX directory>/wxOil/ftfonts.cpp.  Edit this file and change from:

#ifdef __WXGTK20__
#include <gtk/gtk.h>
extern GtkWidget *wxGetRootWindow();
#endif

to:

#ifdef __WXGTK20__
//#include <gtk/gtk.h>
extern PangoContext *gtk_widget_get_pango_context    (GtkWidget   *widget);
extern GtkWidget *wxGetRootWindow();
#endif

No comments:

Post a Comment