- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My Fortran program contains relative file paths, e.g.
data/output.txt
What determines where these paths are taken "relative" to?
When I compiling on Windows (using IVF 11.1 integrated into VS2005), the base directory is taken as the VS project folder (where the source files are), even though the object, module and executable files are saved into the Debug or Release subdirectory.
On Linux (using IVF 11.0), I am trying to preserve the VS-style directory structure (i.e. Debug and Release subdirectories). This means (in simplified terms) compiling with commands along the lines of:
ifort -o Debug/functions.o -module Debug/ -c functions.f90
ifort -o Debug/main.o -module Debug/ -c main.f90
ifort -o Debug/prog.out Debug/main.o Debug/functions.o
When I do this, the base directory is taken as the Debug folder, not the folder where the source files are.
What do I need to do to make the two consistent? Can I set something on the command line to determine the base directory?
Thanks.
data/output.txt
What determines where these paths are taken "relative" to?
When I compiling on Windows (using IVF 11.1 integrated into VS2005), the base directory is taken as the VS project folder (where the source files are), even though the object, module and executable files are saved into the Debug or Release subdirectory.
On Linux (using IVF 11.0), I am trying to preserve the VS-style directory structure (i.e. Debug and Release subdirectories). This means (in simplified terms) compiling with commands along the lines of:
ifort -o Debug/functions.o -module Debug/ -c functions.f90
ifort -o Debug/main.o -module Debug/ -c main.f90
ifort -o Debug/prog.out Debug/main.o Debug/functions.o
When I do this, the base directory is taken as the Debug folder, not the folder where the source files are.
What do I need to do to make the two consistent? Can I set something on the command line to determine the base directory?
Thanks.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you run from inside Visual Studio on Windows, VS sets the default to be the folder directory. But if you run the EXE from outside VS, or on Linux, the default is the directory containing the executable. In VS you can set a different default directory on the Debugging property page ("Start in").

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page