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

dll dependencies

trnsys
Beginner
996 Views
Hello,
I am working with a program that has an exe/dll structure. When I launch the exe on my computer, it loads the DLL just fine. When I do the same on a target computer that does not have the Visual Studio or Intel Fortran compiler installed I get an error that the dll cannot be found. I used depends.exe to investigate my dll. The only dll therein that was flagged was msvcr80.dll. I moved that to the same directory that contains both the exe and my dll on the target computer and I still get the same error. I recall having this same problem many years ago with the CVF compiler but then adding msvcrt.dll and dforrt.dll (both flagged by depends.exe) solved the problem. Can anyone offer me some hints on how I might find out what is causing the error?
Many thanks in advance,
David
0 Kudos
3 Replies
Steven_L_Intel1
Employee
996 Views
There are two sets of DLLs you need to be concerned about, Intel's and Microsoft's. Dependency Walker can tell you which DLLs you depend on. For the Intel DLLs, copying them to the folder where your EXE is will suffice. For Microsoft DLLs, if you are using VS05 or VS08, you need to install Microsoft's redistributable package on the target system, since it uses "side by side assemblies. Here's the links: VS05 VS08

As with CVF, you want to make sure you build a Release configuration and not Debug.
0 Kudos
trnsys
Beginner
996 Views
Thanks, Steve. That did the trick. Now I guess I have two follow up questions...

1. do you know if the contents of those VS05 and VS08 runtime libraries are available so that we can build those files into our own install or whether we just need to have our executable run the executable that you had me download?

2. Is there a runtime library that will allow a debug mode dll to run on the target machine? This may seem an odd question but the software that we develop is such that some users run it only in release mode while others develop new add-ons of their own and so need to run our dll in debug mode along with their own dlls (which may or may not be developed with a compiler that is in the Microsoft Visual Studio environment.

Thanks, as always for your very informative help!
David


0 Kudos
Steven_L_Intel1
Employee
996 Views
1. If you have a retail version of VS05 or VS08, Microsoft provides the DLLs and manifest files under the VCRedist folder, as well as Windows Installer Merge Modules. See http://msdn.microsoft.com/en-us/library/zebw5zk9.aspx

2. This is tricky. The key is to not link against the debug form of the run-time DLLs. You can specify this in your project options (under Libraries - don't specify the Debug DLL form). Depending on what your users are doing, though, this may cause conflicts with their own code. I think it will usually work. You may also want to experiment with linking your DLL against the non-DLL form of the libraries. This is viable only if your users are not writing in Fortran.

0 Kudos
Reply