Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Making statically-linked files

Harry_A_
Beginner
482 Views

I am using 18.0.0.124 {IA-32] with Microsoft Virtual Studio community edition 2015.

I need to know how to make a statically-linked Fortran program.  I want to include all the necessary DSLLs in the output file.

0 Kudos
3 Replies
TimP
Honored Contributor III
482 Views

You may be able to make full static .exe by avoiding OpenMP/parallel and using /MT link switch or equivalent VS property.  But my docs say that the 2018 ifort has gone back to making this the default (?).

0 Kudos
Steve_Lionel
Honored Contributor III
482 Views

Static linking is the default from the command line, but DLL linking is the default in Visual Studio projects. I don't think this has changed in several years. Two kinds of Fortran run-time support are DLL-only: OpenMP and coarrays.

In your Visual Studio project properties. select Fortran > Libraries > Use Run-Time Library > Multithreaded (/MT).

0 Kudos
andrew_4619
Honored Contributor II
482 Views

in addition to Steve's comment (Maybe it implies openMP)  /Qparallel also makes it non-static linking

0 Kudos
Reply