Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

DLLs and Fortran file unit numbers

Elizabeth_W_
Beginner
650 Views

Hi everyone,

I'm using ifort 17.0.2 on the command line (via nmake) to compile a Fortran DLL library and executable.

One problem I'm having is the issue of unit numbers being distinct in the DLL and executable.  I've read all the posts I could find on this and the solution was to make sure that the DLL and the executable link to the same run-time library (e.g., both have /MD switch).  This doesn't work for me though.  Is there anything else that needs to be done?  The library and program run fine if I don't do any input/output.

--Elizabeth

0 Kudos
2 Replies
jimdempseyatthecove
Honored Contributor III
650 Views

OPEN has NEWUNIT Specifier

Jim Dempsey

0 Kudos
Steve_Lionel
Honored Contributor III
650 Views

Using the same DLL runtime library should have solved this problem. (Using NEWUNIT isn't going to help here.)  What I'd suggest is to download Dependency Walker (http://dependencywalker.com/), run it and open your EXE. It should show that the EXE and your DLL are both referencing the same run-time DLLs.

0 Kudos
Reply