Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Making statically-linked files

Harry_A_
Beginner
151 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
Black Belt
151 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 (?).

Steve_Lionel
Black Belt Retired Employee
151 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).

andrew_4619
Honored Contributor I
151 Views

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

Reply