Hi,

perhaps you meant g_quark_to_string instead of q_quark_to_string (notice
the leading `g')?

For reference, take a look at

http://developer.gnome.org/doc/API/2.0/glib/glib-Quarks.html

Hope this helps,

----
Stefano

> Hello Everybody,
> 
> I was trying to teach myself GNOME programming
> (using The Official GNOME 2.0 Developer's Guide)
> I wrote the following program:
> -------------------------------------------------------------
> #include <glib.h>
> 
> int main(int argc, char *argv[])
> {
>         GQuark test_quark;
> 
>         test_quark = g_quark_from_string("Santanu");
>         if(!q_quark_try_string("Chatterjee")){
>                 g_print("There is no quark for \"Chatterjee\"\n");
>         }
>         g_print("test_quark is a representation of %s\n",
> q_quark_to_string(test_quark));
> 
>         return (0);
> }
> --------------------------------------------------------------
> (Please note that the indentation might get garbled in the
> email)
> 
> Then I tried to compile it using:
> $ gcc `pkg-config --clibs --libs glib-2.0` tryglib.c -o tryglib
> 
> But I get this:
> ---------------------------
> /tmp/ccwz8ywE.o: In function `main':
> tryglib.c:(.text+0x38): undefined reference to `q_quark_try_string'
> tryglib.c:(.text+0x5a): undefined reference to `q_quark_to_string'
> collect2: ld returned 1 exit status
> ---------------------------
> 
> What could I have done wrong? I have checked the
> glibc manual using devhelp, and verified that those
> two functions exist.
> 
> (I am using Ubuntu with GNOME 2.12.1)
> 
> Thanks in advance for your help.
> 
> Regards,
> Santanu
> _______________________________________________
> gnome-love mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/gnome-love

_______________________________________________
gnome-love mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-love

Reply via email to