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

DLL-hell with libiomp5md.dll - OpenMP

Jon_D
New Contributor I
536 Views

Hello,

I have been spinning my wheels on this for a few days now without success and I am hoping that somebody might have a solution.

I am writing a VB.NET code to extend the UI of a commercial software (I am a paying customer of the software, not the developer). The VB code calls a Fortran DLL (let's call it F.dll) that I developed to perform some array operations using OpenMP. So, basically F.dll depends on libiomp5md.dll. It turns out that the commercial software is also using libiomp5md.dll but an older version. To be more specific, the older version is 5.0.2015.609 and the newer version that came with my Fortran compiler is 5.0.2021.428.

When I run the commercial software with the extended UI, my F.dll automatically tries to use the older version of the libiomp5md.dll which seems to be incompatible with the new version. I end up with a DllNotFound error.  

I tried using LoadLibraryExA function from kernel32.dll to change the dll search order without success. I thought about renaming libiomp5md.dll and related files in my Fortran compiler distribution so that, effectively, F.dll is looking for a different dll but I don't know how to do that or even if it would work. 

Has anybody ever dealt with this situation? I would really appreciate any suggestions.

Jon

0 Kudos
1 Reply
jimdempseyatthecove
Honored Contributor III
509 Views

>>I end up with a DllNotFound error.  

Does the error message state which DLL is not found?

(at least the name)

Note, DLL's are to be "registered" on Windows. See:

https://support.microsoft.com/en-us/topic/how-to-use-the-regsvr32-tool-and-troubleshoot-regsvr32-error-messages-a98d960a-7392-e6fe-d90a-3f4e0cb543e5

This article may be of help too:

https://stackoverflow.com/questions/1578109/use-2-different-versions-of-same-control-dll-at-the-same-time-on-same-machine

Jim Dempsey

0 Kudos
Reply