Strange errors when compiling GTK progs???
I am compiling the following GTK program and I getting very strange messages.
Pls help
// test2.c
#include <gtk/gtk.h>
static void delete_event(GtkWidget *widget , gpointer data)
{
gtk_main_quit();
}
int main(int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *button;
gtk_init(&argc , &argv);
window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_set_window_border_width(GTK_CONTAINER(window) , 10);
g_signal_connect(GTK_OBJECT(window) , "delete_event" , G_CALLBACK(delete_event), NULL);
button=gtk_new_button_with_label("GO GO");
gtk_container_add(GTK_CONTAINER(window) , button);
gtk_widget_show(button);
gtk_widget_show(window);
gtk_main();
return(0);
}
Command for compiling:: gcc test2.c -o test2 `pkg-config gtk+-2.0 --cflags --libs`
Errors
test2.c: In function `main':
test2.c:14: warning: assignment makes pointer from integer without a cast
/tmp/ccbSWpes.o(.text+0x61): In function `main':
: undefined reference to `gtk_set_window_border_width'
/tmp/ccbSWpes.o(.text+0xa7): In function `main':
: undefined reference to `gtk_new_button_with_label'
pls help fast....
|