GFile issue: undefined reference to `g_file_new_for_path'

2008-05-04 Thread Soulivanh Anothay
Hello everybody,
I have just manually installed the newer version of GLib 2.16.3 , I
have checked the installation by issuing this command: pkg-config
--modversion glib-2.0 and it returned: 2.16.3
. This should confirmed me that the previous installation of GLib
2.16.3 was successful.

However, here is my question. When I compiled my program, I got this
message: undefined reference to `g_file_new_for_path'
.

I do not know the reason why? Please anyone who could give any suggestion?

My code was just simple as this:

GFile* g_file_source = NULL;
GFile* g_file_dest = NULL;

   g_file_source = g_file_new_for_path  (/home/sanothay/mytest-directory);

  g_file_dest = g_file_new_for_path  (/media/usb1);

  gboolean return_val = g_file_move (g_file_source, g_file_dest,
G_FILE_COPY_OVERWRITE , NULL, NULL, NULL, error);

Thanks a lot in advance,
Cheers,
Soulivanh
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GFile issue: undefined reference to `g_file_new_for_path'

2008-05-04 Thread A. Walton
On Sun, May 4, 2008 at 7:15 AM, Soulivanh Anothay [EMAIL PROTECTED] wrote:
 Hello everybody,
  I have just manually installed the newer version of GLib 2.16.3 , I
  have checked the installation by issuing this command: pkg-config
  --modversion glib-2.0 and it returned: 2.16.3
  . This should confirmed me that the previous installation of GLib
  2.16.3 was successful.

  However, here is my question. When I compiled my program, I got this
  message: undefined reference to `g_file_new_for_path'
  .

  I do not know the reason why? Please anyone who could give any suggestion?

  My code was just simple as this:

 GFile* g_file_source = NULL;
 GFile* g_file_dest = NULL;

g_file_source = g_file_new_for_path  
 (/home/sanothay/mytest-directory);

   g_file_dest = g_file_new_for_path  (/media/usb1);

   gboolean return_val = g_file_move (g_file_source, g_file_dest,
  G_FILE_COPY_OVERWRITE , NULL, NULL, NULL, error);

Be sure you're including libs and cflags for gio-2.0 as well.

-A. Walton

  Thanks a lot in advance,
  Cheers,
  Soulivanh
  ___
  gtk-app-devel-list mailing list
  gtk-app-devel-list@gnome.org
  http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Representing XML in Tree Stores

2008-05-04 Thread dhk
What is the best way to represent complex xml in a tree store?

It seems like it should be easy, but when looping the models with 
gtk_tree_model_foreach() some problems arise:  especially when there are 
multiple views on different notebook tabs.

The approach I am using is one Tree Store for each complex xml node. 
Then for each item in the first tree I have to loop all other trees to 
find the nodes that belong to it.  I do this by use gtk_tree_model_get() 
on each row to see if the sequence numbers match and if they do it gets 
processed.  The problem I have is I'm looping each store multiple times 
to find what I want, which seems inefficient, instead of looping each 
store once.

Any ideas?

Thanks
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: valgrind helloworld example returns errors

2008-05-04 Thread Stefan Kost
hi,

Steven Kauffmann schrieb:
 Hello all,
 
 A few weeks ago I started with the gtk tutorial. I tried some of the
 examples and everything is working fine, but valgrind reports some
 errors (first hello world example)[*].
 
 If those little examples already returns errors, further programs I'm
 going to write will also return errors, which I better avoid.
 
 Can someone explain me why this example returns errors and can I
 safely ignore this or how can I avoid those errors?

you seem to have no suppressions for libc-2.7. These are all things in libc 
that 
you don't need to worry about.

Stefan

 
 Thanks in advance
 
 Steven
 
 [*] $ export G_DEBUG=gc-friendly
 $ export G_SLICE=always-malloc
 
 $ valgrind --leak-check=yes ./helloworld
 ==2983== Memcheck, a memory error detector.
 ==2983== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
 ==2983== Using LibVEX rev 1804, a library for dynamic binary translation.
 ==2983== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
 ==2983== Using valgrind-3.3.0-Debian, a dynamic binary instrumentation
 framework.
 ==2983== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
 ==2983== For more details, rerun with: -v
 ==2983==
 ==2983== Invalid read of size 4
 ==2983==at 0x40151F3: (within /lib/ld-2.7.so)
 ==2983==by 0x4005C69: (within /lib/ld-2.7.so)
 ==2983==by 0x4007A97: (within /lib/ld-2.7.so)
 ==2983==by 0x4011543: (within /lib/ld-2.7.so)
 ==2983==by 0x400D5D5: (within /lib/ld-2.7.so)
 ==2983==by 0x4010F5D: (within /lib/ld-2.7.so)
 ==2983==by 0x474A161: (within /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x400D5D5: (within /lib/ld-2.7.so)
 ==2983==by 0x474A324: __libc_dlopen_mode (in /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x47240A6: __nss_lookup_function (in 
 /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x47241BF: (within /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x4725F95: __nss_passwd_lookup (in /lib/i686/cmov/libc-2.7.so)
 ==2983==  Address 0x4a79be0 is 32 bytes inside a block of size 34 alloc'd
 ==2983==at 0x4022AB8: malloc (vg_replace_malloc.c:207)
 ==2983==by 0x4008031: (within /lib/ld-2.7.so)
 ==2983==by 0x4011543: (within /lib/ld-2.7.so)
 ==2983==by 0x400D5D5: (within /lib/ld-2.7.so)
 ==2983==by 0x4010F5D: (within /lib/ld-2.7.so)
 ==2983==by 0x474A161: (within /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x400D5D5: (within /lib/ld-2.7.so)
 ==2983==by 0x474A324: __libc_dlopen_mode (in /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x47240A6: __nss_lookup_function (in 
 /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x47241BF: (within /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x4725F95: __nss_passwd_lookup (in /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x46D09E2: getpwnam_r (in /lib/i686/cmov/libc-2.7.so)
 ==2983==
 ==2983== Invalid read of size 4
 ==2983==at 0x4015220: (within /lib/ld-2.7.so)
 ==2983==by 0x4005C69: (within /lib/ld-2.7.so)
 ==2983==by 0x4007A97: (within /lib/ld-2.7.so)
 ==2983==by 0x400BC16: (within /lib/ld-2.7.so)
 ==2983==by 0x400D5D5: (within /lib/ld-2.7.so)
 ==2983==by 0x400BDF9: (within /lib/ld-2.7.so)
 ==2983==by 0x40115A3: (within /lib/ld-2.7.so)
 ==2983==by 0x400D5D5: (within /lib/ld-2.7.so)
 ==2983==by 0x4010F5D: (within /lib/ld-2.7.so)
 ==2983==by 0x474A161: (within /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x400D5D5: (within /lib/ld-2.7.so)
 ==2983==by 0x474A324: __libc_dlopen_mode (in /lib/i686/cmov/libc-2.7.so)
 ==2983==  Address 0x4a79f28 is 24 bytes inside a block of size 27 alloc'd
 ==2983==at 0x4022AB8: malloc (vg_replace_malloc.c:207)
 ==2983==by 0x4008031: (within /lib/ld-2.7.so)
 ==2983==by 0x400BC16: (within /lib/ld-2.7.so)
 ==2983==by 0x400D5D5: (within /lib/ld-2.7.so)
 ==2983==by 0x400BDF9: (within /lib/ld-2.7.so)
 ==2983==by 0x40115A3: (within /lib/ld-2.7.so)
 ==2983==by 0x400D5D5: (within /lib/ld-2.7.so)
 ==2983==by 0x4010F5D: (within /lib/ld-2.7.so)
 ==2983==by 0x474A161: (within /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x400D5D5: (within /lib/ld-2.7.so)
 ==2983==by 0x474A324: __libc_dlopen_mode (in /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x47240A6: __nss_lookup_function (in 
 /lib/i686/cmov/libc-2.7.so)
 ==2983==
 ==2983== Invalid read of size 4
 ==2983==at 0x4015237: (within /lib/ld-2.7.so)
 ==2983==by 0x4005C69: (within /lib/ld-2.7.so)
 ==2983==by 0x4007A97: (within /lib/ld-2.7.so)
 ==2983==by 0x4011543: (within /lib/ld-2.7.so)
 ==2983==by 0x400D5D5: (within /lib/ld-2.7.so)
 ==2983==by 0x4010F5D: (within /lib/ld-2.7.so)
 ==2983==by 0x474A161: (within /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x400D5D5: (within /lib/ld-2.7.so)
 ==2983==by 0x474A324: __libc_dlopen_mode (in /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x47240A6: __nss_lookup_function (in 
 /lib/i686/cmov/libc-2.7.so)
 ==2983==by 0x4F82FFB: (within /lib/i686/cmov/libnss_compat-2.7.so)
 ==2983==by 0x4F845D4: 

Re: GFile issue: undefined reference to `g_file_new_for_path'

2008-05-04 Thread Brian J. Tarricone
On Sun, 4 May 2008 07:34:30 -0400 A. Walton wrote:

 On Sun, May 4, 2008 at 7:15 AM, Soulivanh Anothay
 [EMAIL PROTECTED] wrote:
  Hello everybody,
   I have just manually installed the newer version of GLib 2.16.3 , I
   have checked the installation by issuing this command: pkg-config
   --modversion glib-2.0 and it returned: 2.16.3
   . This should confirmed me that the previous installation of GLib
   2.16.3 was successful.
 
   However, here is my question. When I compiled my program, I got
  this message: undefined reference to `g_file_new_for_path'
   .
 
   I do not know the reason why? Please anyone who could give any
  suggestion?
 
   My code was just simple as this:
 
  GFile* g_file_source = NULL;
  GFile* g_file_dest = NULL;
 
 g_file_source = g_file_new_for_path
  (/home/sanothay/mytest-directory);
 
g_file_dest = g_file_new_for_path  (/media/usb1);
 
gboolean return_val = g_file_move (g_file_source, g_file_dest,
   G_FILE_COPY_OVERWRITE , NULL, NULL, NULL, error);
 
 Be sure you're including libs and cflags for gio-2.0 as well.

And also make sure you're not just linking to the new glib at link
time, but also at run time.  'ldd' can tell you what libraries will get
loaded at run time, and you can use LD_LIBRARY_PATH (assuming you're on
Linux) to mess with that if it's not correct.

-brian
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list