trouble with g_stat

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

 



My use of g_stat causes a segfault, but regular stat works ok. I’m using mingw64 on Win10 under msys2.

Both of the following examples compile ok, but while this works:

//------------------

GString *fspec;

struct stat sB;

//fspec->str tested to hold the correct file spec…

if(stat(fspec->str,&sB)>0){… [as expected]

 

this doesn’t:

//------------------

GString *fspec;

GStatBuf *stBuf;

//fspec->str tested to hold the correct file spec…

if(g_stat(fspec->str,stBuf)<0){… [9476 Segmentation fault]

 

I’ve tried tinkering with various permutations, but nothing else compiles.

Incidentally, I am just getting stated with GTK+/GLib, and they look like just what I need; however, I’m concerned about the lack of examples on the web. I bought Foundations of GTK+ Development, and it has a lot of useful information, but it doesn’t have as many examples as I’d like, either. In the beginning, code examples are really key, so I’d welcome any URLs or suggestions. Thank you.

 

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux