diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index a655706aa5..46345f1820 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -160,7 +160,9 @@ gtk_scrollbar_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win ) extern bool wxIsInsideYield; -typedef void (*GtkDrawCallback)(GtkWidget *widget, GdkRectangle *rect); +extern "C" { + typedef void (*GtkDrawCallback)(GtkWidget *widget, GdkRectangle *rect); +} static GtkDrawCallback gs_gtk_text_draw = NULL; diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index a655706aa5..46345f1820 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -160,7 +160,9 @@ gtk_scrollbar_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win ) extern bool wxIsInsideYield; -typedef void (*GtkDrawCallback)(GtkWidget *widget, GdkRectangle *rect); +extern "C" { + typedef void (*GtkDrawCallback)(GtkWidget *widget, GdkRectangle *rect); +} static GtkDrawCallback gs_gtk_text_draw = NULL;