Re: compile error

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

 



Aaron Yang wrote:

hi everyone,


Hello

 does anyone know why i get the following error:

passing arg 2 of `g_timeout_add' makes pointer from
integer without a cast

 when i write my code as such:

g_timeout_add (1000, time (NULL), G_OBJECT (button));


Remove "(NULL)" characters, with them you're putting the result of the time as parameter, not a pointer to the "time" function. You have to use smth like: g_timeout_add (1000, (GSourceFunc)time, button).
PS: you shouldn't use name "time" as a name for your function because it's standard function from the C library.


 and time function is as follows:

gint time( gpointer data )
{
/* some code */
}


   Olexiy

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux