You should use GTK_ENTRY instead of a direct cast because GTK_ENTRY does type checking. GtkWidget *myEntry; const char* text ; myEntry=gtk_entry_new(); ... text = gtk_entry_get_text( GTK_ENTRY(myEntry)); Cheers, Dome