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

How to include the necessary MKL objects into an executable to be used elsewhere?

Ever
New Contributor I
397 Views

I use VS2019 and Intel oneAPI 2023 to build an application intended to run on a Win 10 machine that has no VS and no oneAPI. If the application would not use MKL, then the executable runs fine on the target machine, but now I need to use MKL. On the target machine I get an error, mklsequential.2.dll not available.

I have never used the command line to link a project, all I know is VS.  On VS, Project > Properties > Fortran > Libraries, Use Intel math Kernel Library: /Qmklsequential, and in Runtime Library: well, I tried all the options, nothing works.

The project runs fine when executed inside VS. In solution explorer picture below, you can see that most of the code is already compiled into and .obj file, and there are the calls to the MKL. Maybe I have to do something special when I compile that code? 

Update: I deleted the .obj file, and brought in all the source code to replace that. I compiled and linked in VS in the usual way: Build, Rebuild Solution. No luck. Double-click on the .exe, get "mklsequential.2.dll not available".

I tried to read the oneAPI documentation, but it blew my mind. I'm just a materials science teacher with Fortran coding experience, no more. What can I do? 

 

configurationManagerFortranLibraries.png

 

solutionExplorerFortranLibraries.png

Labels (1)
0 Kudos
2 Replies
Steve_Lionel
Honored Contributor III
381 Views

This is really an MKL question that could be asked in Intel® oneAPI Math Kernel Library - Intel Community  Basically, what you want is to link to static MKL libraries - it's been a while since I looked at this so don't know if that's still an option. Yes, Intel Fortran has some convenient options to link to MKL, but you don't get much control over which set.

0 Kudos
Ever
New Contributor I
259 Views

Here is how I did it. It works. Basicaly the Runtime Library must ve /libs:static.  

configurationManagerFortranLibrariesRuntimeLibrarySOLVED.png

 

0 Kudos
Reply