Specifying Consistent Library Types

This topic only applies to Windows*.

There are a number of Visual C++* run-time libraries that offer the same entry points but have different characteristics. The default Visual C++* library is libcmt.lib, which is multi-threaded, non-debug, and static.

The Intel® Visual Fortran and Microsoft* Visual C++* libraries must be the same types. The incompatible types are listed below.

The default Intel® Visual Fortran libraries depend on the project type:

Fortran Project Type

Default Libraries Used

Fortran Console

Static, multi-threaded libraries libifcoremt.lib and libcmt

Fortran Standard Graphics

Static, multithreaded libraries libifcoremt.lib and libcmt.lib

Fortran QuickWin

Static, multithreaded libraries libifcoremt.lib and libcmt.lib

Fortran Windows

Static, multithreaded libraries libifcoremt.lib and libcmt.lib

Fortran DLL

Dynamic-link libraries libfcoremd and msvcrt (and their import libraries)

Pure Fortran applications can have mismatched types of libraries. One common scenario is a Fortran Windows* application that is linking with a Fortran static library. This can cause link-time conflicts as well as undesired runtime failures. The Fortran library should be rebuilt as a dynamic library to avoid these issues.

Similarly, different C/C++ applications link against different C libraries. If you mix the different types of applications without modifying the defaults, you can get conflicts. The debug version of a library has a letter d appended to its base file name:

When using a Debug configuration, Visual C++* selects the debug libraries.

The Intel® Visual Fortran Compiler does not select debug libraries for any configuration, but provides settings that allow you to request their use. To specify different types of Fortran libraries in the IDE, select Project > Properties, then select the Libraries category on the Fortran tab:

Note

This option does not cause static linking of libraries for which no static version is available, such as the OpenMP run-time libraries on Windows* or the coarray run-time libraries. These libraries can only be linked dynamically.

See also Building Intel® Fortran C Mixed-Language Programs on Windows* Systems.

See Also