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

How include IMSL dlls in a DLL?

Amedin__Celse_Kafui
797 Views
Hi,

Iam usingFortran Compiler (ID w_cprof_p_11.1.065) and IMSL library in VS 2008 (9.0.2122.8 RTM) to compile a DLL subroutine. The DLL runs right in my computer but in a computer where Fortran and IMSL are not installed,I have message that some DLL are not found. Dependency walker lists the following files:
imsl_dll.dll
libifcoremd.dll
libifportmd.dll
libiomp5md.dll
libmmd.dll

Please, how include these dll in the VS project to compile my code to use in a computer which these DLL?
I have added the paths of these DLL in menu "Tools/Intel Visual Fortran/Compilers/Includes" of VS, but the problem persists.
In my subroutine, I also added "INCLUDE link_fnl_shared.h"...

Thanks.

ckam
0 Kudos
2 Replies
mecej4
Honored Contributor III
797 Views
You seem to harbor a misunderstanding of the nature and role of shared libraries (DLLs).

When you link your code (EXE or your own DLL) to other DLLs (provided by the OS vendor, the compiler vendor, someone else or you), the hooks are established for proper functioning of the linkages between your code and the codes in the DLLs -- that's all. Specifically, the code in each DLL stays in the DLL. Your EXE gets only the hooks and any needed hand-shaking code.

That is why you have to package all the DLLs needed for your EXE or DLL to run (or, if that is not appropriate, give directions to your clients for obtaining the DLLs themselves).

Similarly, INCLUDE-ing an interface declaration does not -- cannot -- cause the linker to take code from a library and merge it into your EXE. An INCLUDELIB directive, however, is passed along to the linker. Even then, if the target of the INCLUDELIB is a DLL rather than a static library, no code from that DLL is merged into your code.
0 Kudos
netphilou31
New Contributor III
797 Views
If you want to avoid this you can link statically your DLL with the required libraries. Your DLL size will be bigger but no additional dll (except the ones that are provided with the OS) are needed. This can be done in the project properties window : Fortran -> Libraries -> Runtime library: use /libs:static /threads; add /dbglibs for debug configuration...
0 Kudos
Reply