Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
36 Views

Making statically-linked files

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
Highlighted
Black Belt
36 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
Highlighted
Black Belt Retired Employee
36 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
Highlighted
Valued Contributor III
36 Views

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

0 Kudos