Re: [gtk-list] Re: Need help on Gtk--




No problem.   The type of int system(const char *) did not match
the profile of void Gtk_Button::clicked();.  Therefore, to get
it working you will need to give the compiler some help.  

Add a function that looks like this...

void mysystem(const char *str)
{
  system(str);
}


This will get the return type right.  

Then we will need to change the why the connect gets made slightly
because the compiler is guessing that the type of "kterm &" is
const char[] not const char*.  So use

connect_to_function(button->clicked,&mysystem,(const char*)"kterm &");

Or alternatively declair a const char* somewhere earlier and pass
that pointer instead.


(It now compiles on my system.)  So hopefully this will
help.

--Karl



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