[Glade-users] undefined reference to `galde_xml_get_widget'?



My first guess it is that you misspelled the function name.

It is:

     b = glade_xml_get_widget(ui,"start");
not
   b = galde_xml_get_widget(ui,"start");

MaaSTaaR escreveu:
Hello..

Firstly sorry for my bad English, i am not new with GTK and Glade, i am
using them under Python, i tried to use them under C but i have some
problems.

This is my code :

#include <stdio.h>
#include <gtk/gtk.h>
#include <glade/glade.h>

int main(int argc, char *argv[])
{
   GladeXML *ui;
   GtkWidget *w,*t,*b;
   const gchar *text;

   gtk_init(&argc,&argv);
   ui = glade_xml_new("./gui/main.glade",NULL,NULL);

   w = glade_xml_get_widget(ui,"window1");

g_signal_connect(G_OBJECT(w),"delete-event",G_CALLBACK(gtk_main_quit),NULL);


   t = glade_xml_get_widget(ui,"word"); // This is label

   text = gtk_entry_get_text(t);

   b = galde_xml_get_widget(ui,"start"); // This is button

   gtk_main();
}

and when i compile this file, these problems show for me :

maastaar at MaaSTaaR:~/debug/C/MySmartDictionary$ gcc `pkg-config --libs
--cflags gtk+-2.0 libglade-2.0` -o main main.c
main.c: In function 'main':
main.c:19: warning: passing argument 1 of 'gtk_entry_get_text' from
incompatible pointer type
main.c:21: warning: assignment makes pointer from integer without a cast
/tmp/ccCkkumP.o: In function `main':main.c:(.text+0xd9): undefined
reference
to `galde_xml_get_widget'
collect2: ld returned 1 exit status


the problem from this line "b = galde_xml_get_widget(ui,"start"); //
This is
button" but i don't know what this problem exactly.

i am working under Linux (Dirsto : Ubuntu)


------------------------------------------------------------------------

_______________________________________________
Glade-users maillist  -  Glade-users at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/glade-users

-- 
Diogo F. S. Ramos




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