I built a static library by calling some function in MKL. Now, I want to deploy my library to others that may not have MKL. Just wondering whether my static library is self-contatined such that its caller does not need MKL anymore?
Check with dumpbin /dependents your.exe If you have linked MKL threaded, a dependency on OpenMP shared library is expected.
You must have a commercial license to support distributing to others. If you do, you are entitled to package the necessary MKL shared libraries or the distributable library package if it's a compiler license.
A static library is not self-contained - it has only the code you built in to the library. All external references need to be resolved when the application is linked on the end-user's system. As Tim notes, a commercial (or academic, but not student) license for either the compiler or for MKL individually permits redistribution of the MKL libraries, even the static library form. The end user will also need the Intel Fortran and OpenMP linkable libraries, either static or shared, to link with.
You may find that building a DLL is a better choice - you can either specify that the dependent libraries are linked in statically (except for OpenMP, which can't be), or you can leave them as dynamic and then simply require that the end-user install the Intel "redistributables" package that we provide. (Installing a Microsoft Visual C++ redistributable package may also be required.)
Steve and Tim:
Thanks a lot for your reply. I do have commercial license for redistributation but my user may not have the MKL. That's why I asked how to make the library self contained.
MKL is included in your redistribution license.