Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7029 Discussions

MKL linking process is very long in release mode (VS2016)


I have static lib myLib.lib and executable myExe.exe that is using myLib. MKL is enabled for the mylib, the model is "sequential" in the VS Intel Performance Library settings (for exe project I have tried to build both with and without enabled MKL, looks like doesn't matters ).  In debug all building fast(with or without mkl). In release without of MKL - build is fast, and with enabled MKL linking process of myExe.exe is very-very long - something like 15 minutes(without using mkl all build time is 1 min). I have tried both MS C++ compiler and linker and Intel Compiler and linker. How "to fix" this? 

0 Kudos
1 Reply


Could you please tell more about your usage model and what MKL function list?  The reason of long time mainly is about the long processing of MSVS lib.exe package all MKL static libraries to your static library.  Basically, we don't encourage to package MKL static library (or any third-party static library) to  one small self library.  

For fix the long time issue, please remove static MKL link in your static project. 

Then when produce exe, link your small static library + MKL static or dynamic library A

​or mkl provide custom dll based on the function you listed, please see the custom dll tools under MKL install folder. ;

Best Regards




0 Kudos