#include "wx/gtk/assertdlg_gtk.h"
 #include "wx/gtk/private/gtk2-compat.h"
 
+#include <stdio.h>
+
 /* ----------------------------------------------------------------------------
    Constants
  ---------------------------------------------------------------------------- */
 
     /* add a stock icon inside it */
     GtkWidget *image = gtk_image_new_from_stock (stock, GTK_ICON_SIZE_BUTTON);
+#if GTK_CHECK_VERSION(2,6,0)
     gtk_button_set_image (GTK_BUTTON (button), image);
+#endif
 
     /* add to the given (container) widget */
     if (box)