- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am evaluating the Intel compiler under windows to overcome a problem. We need to write error and tracking data into a file from a dll that we have created. When we open the file in the main program and pass the LUN to the dll the write statement in the dll open a new file "fort.lun" and sneds the data to there instead of the file originally opened by the main code.
I have tried a few different options in compiling the main code and the dll but I continue to get the same result. IS this an issue with FORTRAN on windows or am I just doing something wrong.
Thanks for any insite or help you can provide.
Ron C.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The solution is to specify that the executable project links against the DLL form of the Fortran run-time libraries. if you don't do this, it uses the static library and then you have two separate copies of the library, neither of which knows the other. Project > Properties > Fortran > Libraries > Use Run-Time Library > Multithreaded DLL. (Use the same setting as for the DLL project.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The solution is to specify that the executable project links against the DLL form of the Fortran run-time libraries. if you don't do this, it uses the static library and then you have two separate copies of the library, neither of which knows the other. Project > Properties > Fortran > Libraries > Use Run-Time Library > Multithreaded DLL. (Use the same setting as for the DLL project.)
That is one of the options I tried. I just went back to check it again, and I still get the same results. I am building the dll in a project that is separate from the main executable. I copy the dll over into the build directory where the executable is built. I have checked the dllandexecutable dependencies with dumpbin and they appear to use the same library.
Am I missing something?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I downloaded a trial for VS2008 and IVF to test this here at home. Once I had both the dll and the terminal code configured to use dynamic libraries it worked.
I am running this on a segregated development environment where I think perhaps the installation of the trial got messed up. We have several different compilers and different versions of VS installed on this machine.
Thanks for your help. The dependency walker makes finding somethign like this easy.
Ron C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad to be of service.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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