Re: Problem with g++ and GtkItemFactory functions



Hi,

Thanks for the quick reply ... but it doesn't really provide me with a solution as far as I can tell:
Sven Neumann wrote:

there's a comment in the gtkitemgactory.h header file that explains
your problem:

/* We use () here to mean unspecified arguments. This is deprecated
 * as of C99, but we can't change it without breaking compatibility.
 * (Note that if we are included from a C++ program () will mean
 * (void) so an explicit cast will be needed.)
 */
typedef void    (*GtkItemFactoryCallback)  ();
typedef void    (*GtkItemFactoryCallback1) (gpointer   callback_data,
                                            guint      callback_action,
                                            GtkWidget *widget);

Am I to provide my own prototype and overwrite the one in 
gtkitemfactory.h?  I'm not sure how I can expect other people to do this 
when downloading and compiling my code.
EG., If I comment out the GtkItemFactoryCallback prototype and replace 
it with the GtkItemFactoryCallback1 prototype, I'm still SOL:
erl_buffer_obj.C: In function `GtkWidget* 
setup_perl_fs_menu(signal_object*)':
perl_buffer_obj.C:59: invalid conversion from `void (*)(signal_object*)' 
to `
  void (*)(void*, unsigned int, GtkWidget*)'
perl_buffer_obj.C:59: invalid conversion from `void (*)(signal_object*)' to `
  void (*)(void*, unsigned int, GtkWidget*)'
perl_buffer_obj.C:59: invalid conversion from `void (*)(signal_object*)' to `
  void (*)(void*, unsigned int, GtkWidget*)'
perl_buffer_obj.C:59: invalid conversion from `void (*)(signal_object*)' to `
  void (*)(void*, unsigned int, GtkWidget*)'
make: *** [perl_buffer_obj.o] Error 1

Is there a solution?

DT

--
Technical Director - Virginia Center for Computer Music
http://www.virginia.edu/music/vccm.html






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]