Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor II
8 Views

DLL generation and static linking to intel runtime libraries

Jump to solution

What is the required flag to generate DLL with the intel runtime libraries linked statically to the DLL? I guess this is in general not a good idea. But in cases where the DLL is going to be used from other languages such as MATLAB/Python/R, it can be quite helpful since there would be no need for a separate installation of the runtime libraries. On Linux, -static-intel achieves the goal, but on Windows, I am not sure what flag is needed. Thanks for any suggestions.

0 Kudos

Accepted Solutions
Black Belt Retired Employee
8 Views

/MT or /libs:static /threads.

Jump to solution

/MT or /libs:static /threads. In Visual Studio, select "Multithreaded" when building the DLL.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran

View solution in original post

0 Kudos
3 Replies
Black Belt Retired Employee
9 Views

/MT or /libs:static /threads.

Jump to solution

/MT or /libs:static /threads. In Visual Studio, select "Multithreaded" when building the DLL.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran

View solution in original post

0 Kudos
Highlighted
New Contributor II
8 Views

Steve, Thank you. Does it

Jump to solution

Steve, Thank you. Does it also automatically link the static Intel MPI library? I suppose it does not.

0 Kudos
Highlighted
Black Belt Retired Employee
8 Views

If you want MPI you have to

Jump to solution

If you want MPI you have to specify it yourself. The only time the compiler will link in MPI is if you enable coarrays and then it's always the shared library. (There is no static coarray support library.)

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos