When i compile the program i am getting following error
Code: (Plaintext)
1 2 3 4 5
callbacks.c: In function ‘on_druidpagestandard2_prepare’:
callbacks.c:54: warning: dereferencing ‘void *’ pointer
callbacks.c:54: error: request for member ‘checkbutton6’ in something not a structure or union
make: *** [callbacks.o] Error 1
{
ex *x = (ex *) w;
gint box_status;
printf("\n");
box_status = gtk_toggle_button_get_active ((GtkToggleButton *)->checkbutton6);
}
i too faced the ssame problem after adding the line my problem is solved
so try this
Joined: 21 Sep 2005 Posts: 386 Location: Fairfax, Virginia
Posted: Mon Nov 20, 2006 4:59 pm Post subject:
First, when using Glade, you should use Libglade to dynamically load the user interface with the GladeXML object. Source code generation is depreciated and takes up a lot of space.
Second, you are trying to retrieve a member from a void pointer, which is what cru_sree recommended. He just forgot to add the 'x' like so:
Also, GTK+ provides functions like GTK_TOGGLE_BUTTON() and GTK_WIDGET() for casting. Use them because they are provided by GObject. Either way will work, but this is the correct way.