Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28459 Discussions

Fortran Compiler (9.1) DLL Deployment Issues (DLL Hell)

sjurs
Beginner
322 Views

All -

I'm attempting to distribute a FORTRAN DLL, built within MS VS2005 using the Intel Fortran 9.1 compiler, as part of a C# project. The development boxes are all configured with MS VS2005 (Version 8.0.50727.762 / SP 050727.7600), Windows XP Professional (SP 2) and the 2.0 Framework. The install boxes do not have the development environment installed, just the 2.0 Framework (same OS and patch level). Weve built the DLL using both the IDE and by makefile. I can successfully execute unit tests on the development boxes, which use the System.Runtime.InteropServices.DllImport function to load the FORTRAN DLL, but when I attempt to execute the unit tests on the install boxes I get the following error message:

Exception: Unable to load DLL 'Name.dll': This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem. (Exception from HRESULT : 0x800736B1).

Initially, two of the development boxes were getting the same error. After analyzing the FORTRAN dll in Depends.exe, it was determined that the two development boxes that were having the issue had older versions of the DLL MSVCR80.dll. The box that built the DLL had version 8.00.50727.762 while the other two boxes had version8.00.50727.42. Upgradingto the latest MS VS2005service pack on these two boxes corrected this issue.

The install boxes have version 8.00.50727.42 of MSVRC80, which I believe is why we are getting the load error. We've upgraded to the latest version of the 2.0 Framework on these boxes, but this DLL doesn't seem to be updated (still sitting at .42).

So to the question: 1) Can I compile the FORTRAN code and specify that it references a specific version of this runtime library? Is there a setting/flag that will allow this? We cannot guarantee the install boxes will have a version of the MSVCR80 DLL greater than whats currently on there now. Or, can this somehow be worked around with the .manfest file generated by the compiler? Is there a way to modify the .manifest file to perform an "OR" command when searching for this DLL?

Any help would be greatly appreciated.

0 Kudos
2 Replies
Steven_L_Intel1
Employee
322 Views
I've seen this issue affect multiple customers. The cause is Microsoft's distributing several variants of MSVCR80.DLL with its development software packages, not all of which are provided by the redistributables installer.

The first thing to try is to install the MS redistributables installer That should work for you, as it provides .762. In the cases it doesn't work, things get more complicated. You can read about deploying using Xcopy

Another option which you may find simpler is to change your DLL build options to link against the static, multithreaded libraries. This will work as long as you are not calling this DLL from Fortran.

0 Kudos
sjurs
Beginner
322 Views
Installing the MS redistributables installer resolved the issue, many thanks.
0 Kudos
Reply