Re: glib and relative file names

2011-10-16 Thread Neil Munro
Yeah I solved this, the problem was the programs current directory which I have now fixed. Thanks anyway. On 16 October 2011 14:52, Ardhan Madras wrote: > > I have tried making the argument and > > converting it to an absolute path by getting the output of > g_get_current_dir > > () which I unde

Re: glib and relative file names

2011-10-16 Thread Ardhan Madras
> I have tried making the argument and > converting it to an absolute path by getting the output of g_get_current_dir > () which I understand to return the current working directory but it > only returns the name of my home directory, which is unusual Why did you manage to build the file path wit

Re: glib and relative file names

2011-10-09 Thread Larry Reaves
pwd.c: #include int main(int argc, char **argv) { gchar *cwd = g_get_current_dir(); g_print("%s\n", cwd); g_free(cwd); return 0; } gcc -o pwd pwd.c `pkg-config --cflags --libs glib-2.0` Works for me. This should work for converting to absolute path in the event you detect a relative fil