- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've created an exectuable using IVF, and when I try to run it on my desktop computer (I'm creating the .exe on my laptop), the program fails. I've also tried the .exe. on another machine, and the program fails at a different point.
The issue seems to be related to the fact that I have an input file that lists the directory paths for three other required files (this is updated when attempting to run on other computers). The console error reads:
forrtl: severe (29): file not found, unit 10, file "directory"
Where do I change the reference to "directory" above? If possible, I'd like this to be the directory in which the executable is located.
Any help would be greatly appreciated.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to make sure that you are trying to open the file in the correct folder, and use the IOSTAT return code on the Open statement to take appropriate action if the file is not found.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also note, when you launch an application it can be launched by command (e.g. Start | Run | DrivePathProgram or in CMD window),or by shortcut, or by click from browser.
When the program is run the "current drive" and "current directory" are not necessarily where the program is located. Therefore, if your application has (requires) a companion file to be co-locatedwith the application then the well writtenapplication will determine the "run from" location rather than assuming the program location is "current drive" and "current directory" (alternately known as "." or simply no prefix).
The 0'th argument on the command line by convention includes the fully qualified path which you can then parse to obtain the run from path (permit "" and "/" in parsing for token seperator). There are other API calls you can use to get the program location if you prefer.
Note, when you find your companion file that contains the paths the use of relative paths are relative to the current drive and directory which is not necessarily relative to the program location (nor the location of the companion file).
Jim Dempsey

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