Linking Against Additional Libraries

By default, the DF command automatically adds the libraries needed to build a Fortran Console application to the link command that it generates.

The /libs:dll option indicates that you want to link against single-threaded DLLs; other /libs options allow you to link against other types of libraries. The /libs:static option (the default) indicates that you want to link against single-threaded static libraries.

You can link against additional libraries by listing those libraries on the command line.

For example, the following command links against static libraries. In addition to linking against the default libraries, it links against the library mylib.lib:

  DF x.f90 mylib.lib

The following command links against single-threaded DLLs:

  DF x.f90 /libs:dll

The following command links against single-threaded DLLs. It links against the default libraries and mylib.lib:

   DF x.f90 /libs:dll mylib.lib

To request the creation of a dynamic-link library, see /dll.

For more information on the types of libraries available to link against, see the following options:

For more information about compiling and linking Visual Fortran and Visual C++ programs (and the libraries used), see Specifying Consistent Library Types.