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

Bundle the libiomp5md.dll into the compiled code?

Nan_Deng
Beginner
968 Views
I use PARDISO in my code which needs to use the libiomp5md.dll during runtime, so I placed this DLL file in the path. However, there are circumstances that distribution of the code with the DLL is not convenient, and I wonder if it is possible to bundle the lib with the executables so Ican distribute the code only.

I have tried to include the libiomp5md.lib in the "additional dependencies" in the link>input menu. But it seems not work and the executable still needs the DLL. Am I missing something? Any guidance from the gurus is appreciated.

I use Composer XE 12.1.3, OS is Win 7 and Win Server 2008.
0 Kudos
4 Replies
Steven_L_Intel1
Employee
968 Views
I don't quite understand the question. Is your "code" a DLL or an EXE? If PARDISO is also making OpenMP calls and you are linking to a static form of PARDISO, you could link to the static OpenMP library, libiomp5mt.lib, but this option is planned to disappear in a release later this year so I don't recommend it. libiomp5md.lib is the "import library" that the linker uses - it provides the connection to the DLL but you don't link to the DLL itself.

In what form are you distributing your code?
0 Kudos
Nan_Deng
Beginner
968 Views
I distribute the code for the EXE, not the DLL - the DLL is from Intel and I would rather not to copy to other computers with the EXE but I need the functionality for PARDISO calls.What would be the best way?
0 Kudos
mecej4
Honored Contributor III
968 Views
You can read a description of the redistributables here. When you distribute your EXE to someone, you can tell them that they will need to download and install

(i) the MSVC runtime redistributables package

and

(ii) the Intel Fortran redistributables package

for the relevant target (IA32 or X64/Intel64) and provide links for downloading these packages.

The reason why an EXE linked with libifcoremd.lib still needs libifcoremd.dll is quite simple. That is the way it is intended to work. The library does not contain any code for the library routines, just linkage information that your EXE will use to call the routines in the DLL. You can see this for yourself by comparing the sizes of the two libraries libifcoremt.lib and libifcoremd.lib.
0 Kudos
Steven_L_Intel1
Employee
968 Views
I would recommend that you include libiomp5md.dll - you can put it in the same folder as the EXE. For now, you could link with the static library version, but this option will disappear in the next version.
0 Kudos
Reply