From: John E. <jo...@ti...> - 2009-02-02 14:58:36
|
----- Original Message ----- From: "Tor Lillqvist" <tm...@ik...> > > What are those strange error codes? Pointer values! ;) > >> where can I find a list of GErrors > > A GError is a struct: > Thanks Tor. I think I must have realised this while you were typing your response > > More important than worrying about whether to use backslashes or > slashes is to realize that if you write software that you intend to > distribute to others, you can not hard-code locations in the file > system in your code. > Yes, I appreciate that - this was just a test to find out what was expected. In fact, since posting I've discovered something that might be significant. If I use a Unix-style path, like so:- GdkPixbuf *const pixbuf = gdk_pixbuf_new_from_file("/usr/local/share/icons/left_arrow.png", &error); I consistently get this error:- Failed to open file "/usr/local/share/icons/left_arrow.png". No such file or directory. Neither the path nor the type of file make any difference. OTOH, if I pass the full Windows path, like so:- GdkPixbuf *const pixbuf = gdk_pixbuf_new_from_file("c:/cygwin/usr/local/share/icons/left_arrow.png", &error); I consistently get a different error:- Couldn't recognize the image file format for file "c:/cygwin/usr/local/share/icons/left_arrow.png". Once again, neither the path nor the type of file make any difference to the error. I must admit, I'm totally confused at the moment but it looks like something's not quite right with my installation. Thanks, John |