A quick look through the FLTK source code suggests that this
is just passed to the RootNode constructor as is, and that the RootNode
constructor just calls fopen to create or read the file. The ANSI/ISO C
standard allows forward slashes for the path delimiter in file names no
matter what the underlying platform uses. So the way you are doing it
will work on any ANSI/ISO compliant C/C++ compiler.

Hope that answers your question.


On Wed, 22 Apr 2009 15:52:09 -0700
Nicholas Shea <[email protected]> wrote:

> My application uses a Data folder that resides in the same directory
> as the app. The paths to my pref files are like this:
> 
> Data                   <-- Directory
>   Preferences          <-- Directory
>      App.pref          <-- Pref file
>      Colors.pref       <-- Pref file
>      ...                   etc
> 
> 
> I then get the App prefs like this:
> 
> Fl_Preferences app( "./Data/Preferences/", "nsheaATtiscali.co.uk",
> "App" );
> 
> 
> This is the third version of the Fl_Preferences constructor as listed
> in the documentation. Previously, I used a custom vendor folder and
> instructed users to install this in the same location as Fltk prefs.
> That of course works fine; but I would like to make things easy so
> that users can just double-click the program and run. If I use a
> custom Root for my prefs as I have done, will it work on Windows
> also? I use Linux and cross-compile for Win32 but can only test under
> Wine; and Wine _seems_ to be ignoring the difference between an Unix
> path and a Win32 path.
> 
> Thanks
> 
> Nicholas Shea
> _______________________________________________
> fltk mailing list
> [email protected]
> http://lists.easysw.com/mailman/listinfo/fltk
> 

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

Reply via email to