Syntax:
The /libs option controls the type of libraries your application is linked with. The default is /libs:static (same as /libs). In the visual development environment, specify the appropriate options in Use Fortran Run-Time Libraries list (for example, an option with DLL in its name sets /libs:dll) in the Libraries Compiler Option Category. These options are:
/libs:dll or /MDs | /libs:static or /ML |
/libs:qwin or /MW | /libs:qwins or /MWs |
This section also contains jumps to related information about libraries.
The /libs options:
The /libs:dll or /MDs option causes the linker to search for unresolved references in
single threaded, dynamic link reference libraries (DLLs). If the unresolved reference is
found in the DLL, it gets resolved when the program is executed (during program loading),
reducing executable program size.
Specifying /libs:dll with /threads is equivalent to /MD.
Specifying /libs:dll with /threads and /dbglibs is equivalent to /MDd.
The /libs:static or /ML option requests that the linker searches only in single threaded, static libraries for unresolved references. This is the default. Specifying /libs:static does not request that dynamic link libraries (DLLs), QuickWin, or Standard Graphics libraries be searched. If you use QuickWin or Standard Graphics routines, use /libs:qwin or /libs:qwins. Specifying /libs (with no keyword) is the same as specifying /libs:static.
Specifying /libs:static with /nothreads is equivalent to /ML.
Specifying /libs:static with /nothreads and /dbglibs is equivalent to /MLd.
Specifying /libs:static with /threads is equivalent to /MT.
Specifying /libs:static with /threads and /dbglibs is equivalent to /MTd.
Specifying /libs:qwin or /MW requests linking with libraries required of a Fortran QuickWin multi-doc (QuickWin) application.
Specifying /libs:qwins or /MWs requests linking with libraries required of a Fortran Standard Graphics (QuickWin single-doc) application.
The following related options request additional libraries to link against:
To request the creation of a dynamic-link library, see /dll.
For information about compiling and linking Visual Fortran and Visual C++ programs (and the libraries used), see Specifying Consistent Library Types and Visual Fortran/Visual C++ Mixed-Language Programs.
For command-line examples of using the /libs option, see Linking Against Additional Libraries.