A application started from the command line should point to the current 
directory, all others not. You can't start a application from the doc or a 
folder in Finder and expect it to work there in.

kind regards
Kai-Uwe Behrmann
-- 
developing for colour management 
www.behrmann.name + www.oyranos.org


Am 15.04.08, 20:38 +0100 schrieb F Andersen:

> I've written a small Mac-OS-X FLTK app that writes a file using fopen(), 
> fwrite(), fclose().
> 
> The call to fopen is something like fopen("test.txt", "w").
> 
> The executable is on my desktop.
> 
> When I run it, the file test.txt is written to the root directory '/' 
> instead of my desktop.
> 
> What can I do to make it write the file to the same directory as the 
> compiled executable?
> 
> I tried fopen("./test.txt", "w") but the file still went to the root 
> directory.
> 
> I also tried fopen("~/Desktop/test.txt", "w") but that crashed the program.
> 
> I'm using fltk 1.1.7 on Mac OS X Tiger.

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to