Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7954 Discussions

Missing import library (.lib) for libiomp5md.dll in conda intel-openmp

BrenoA
New Contributor I
1,556 Views

In order to perform dynamic linking with the libiomp5md.dll file in MSVC, one can either perform implicit dynamic linking, which requires both the dll and an import library (a .lib file, not to be confused with a static library file, which has the same ending), or explicit dynamic linking, which only requires the dll but is a pain to implement, since you have to use LoadLibrary and GetProcAddress in the code. (More information on dynamic linking with MSVC here)

 

For Windows both static libraries and import libraries have a *.lib ending. But the latter only have the function symbols, i.e. they cannot be used for static linking.

 

Isn't it possible to provide the function symbols in an import library file (.lib) together with the shared library (.dll) for libiomp5md in conda intel-openmp, without the static library?

 

According to this answer by Mr. Ying H.,  static libraries cannot be provided, but what about import libraries?

 

Best regards,

Breno

5 Replies
AlekhyaV_Intel
Moderator
1,523 Views

Hi,


Thank you for posting in Intel Communities. Could you please provide us the steps to reproduce your issue so that we can try it out from our end? Also please provide all the information about you OS.

And we suggest you install Intel Base Toolkit/Intel HPC toolkit so that you could have all those libraries including libiomp5.dll. Please let us know if this helps!


Regards,

Alekhya


0 Kudos
BrenoA
New Contributor I
1,503 Views

Hello Alekhya,

 

Thank you for your reply.

 

My OS is x64 Windows 10 (specifically version 10.0.19043.1645).

 

The issue can simply be verified by viewing the Intel openmp anaconda package webpage, downloading the file "win-64/intel-openmp-2022...." and opening it using WinRar or 7zip. Then, open the .tar file, go to Library >> lib and you will not find "libiomp5md.lib", which is the import file (not the static library) required to perform implicit dynamic linking with MSVC (the Microsoft Visual C/C++ compiler).

 

The issue can be reproduced with the following steps:

1- Install Anaconda.

2- Create an environment called "intelTestEnv" for Intel python packages and, for example, mkl-static and intel-openmp for Python 3.9. Open the Anaconda Prompt and write:

>>> conda update conda
>>> conda create --name intelTestEnv --channel intel python=3.9 mkl-static intel-openmp
>>> conda activate intelTestEnv

 Press "y" to accept.

3- Open File Explorer. Go to the folder where Anaconda was installed. Then go to envs >> intelTestEnv >> Library >> lib. This folder is where both static libraries (*.lib) and import libraries (also *.lib) can be found. There is no "libiomp5md.lib" file here.

 

I appreciate the suggestion, but it is only half helpful. In Linux we only need libiomp5.so for dynamic linking. But in Windows and MSVC we need both the libiomp5md.dll file and the import file libiomp5md.lib for (implicit) dynamic linking. The second file is missing from the conda site package "intel-openmp".

 

Thank you in advance,

Breno

0 Kudos
AlekhyaV_Intel
Moderator
1,468 Views

Hi Breno,


Thank you for sharing all the information needed. We could also observe this issue. We will connect with the admin team and get this issue fixed. We will update you soon.


Thanks,

Alekhya


0 Kudos
VarshaS_Intel
Moderator
1,366 Views

Hi,


We have reported this issue to the concerned development team. They are looking into your issue.


Thanks & Regards,

Varsha


BrenoA
New Contributor I
1,221 Views

Hello,

If you are having trouble creating import libraries, please see Walkthrough: Create and use your own Dynamic Link Library (C++) from the Visual Studio documentation.

As can be seen, creating dynamic libraries (.dll) in Windows also generates import libraries (.lib), which are not static libraries, despite the same file ending.

Kind regards,

Breno

0 Kudos
Reply