1

I'm building a custom Intel MKL DLL (2019 Update 2) using the following command:

nmake libintel64 MKLROOT="C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl" name=win\intel64\custom_mkl interface="lp64"

Using dumpbin I can see the the custom_mkl.dll depends on MSVCR120.DLL and libiomp5md.dll. The second dll seems to be ok and has to redistributed as well.

Is it possible to build a custom Intel MKL DLL which doesn't depend on MSVCR120.DLL?

I saw that there is a crt = <c run-time library> parameter but I don't know if this could help.

I cannot directly use the /MT option with the above command.

Wollmich
  • 1,616
  • 1
  • 18
  • 46
  • 1
    Possible duplicate of [Get rid of msvcr120.dll/msvcp120.dll dependency in my Release application (VC++ 2013)](https://stackoverflow.com/questions/27235967/get-rid-of-msvcr120-dll-msvcp120-dll-dependency-in-my-release-application-vc) – Kaveh Vahedipour Mar 15 '19 at 19:53

1 Answers1

1

I can build a custom Intel MKL DLL which doesn't depend on MSVCR120.DLL using the following command with the addition argument crt=libcmt.lib:

nmake libintel64 MKLROOT="C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl" name=win\intel64\custom_mkl interface="lp64" crt=libcmt.lib

The following answer helped me:

There are 4 versions of the CRT link libraries present in vc\lib:

  • libcmt.lib: static CRT link library for a release build (/MT)
  • libcmtd.lib: static CRT link library for a debug build (/MTd)
  • msvcrt.lib: import library for the release DLL version of the CRT (/MD)
  • msvcrtd.lib: import library for the debug DLL version of the CRT (/MDd)

see https://stackoverflow.com/a/3007915/7556646

Wollmich
  • 1,616
  • 1
  • 18
  • 46