Intel® Fortran Compiler 16.0 User and Reference Guide
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 libc.lib, which is single-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.
Mixing single-threaded with multi-threaded versions of the libraries.
Mixing static and dynamic-link versions of the libraries.
Mixing debug with non-debug versions of the libraries.
The default Intel® Visual Fortran libraries depend on the project type:
Fortran Project Type |
Default Libraries Used |
---|---|
Fortran Console |
Static, single-threaded libraries ifcore.lib and libc.lib |
Fortran Standard Graphics |
Static, multithreaded libraries ifcoremt.lib and libcmt.lib |
Fortran QuickWin |
Static, multithreaded libraries ifcoremt.lib and libcmt.lib |
Fortran Windows |
Static, multithreaded libraries ifcoremt.lib and libcmt.lib |
Fortran DLL |
Dynamic-link libraries ifcoremd and msvcrt (and their import libraries) |
Fortran Static Library |
Static, single-threaded libraries ifcore.lib and libc.lib |
Pure Fortran applications can have mismatched types of libraries. One common scenario is a Fortran QuickWin application that links with a Fortran Static library. Fortran QuickWin (and Fortran Standard Graphics) applications must use the static, multithreaded libraries, and by default, Fortran Static libraries are built using static, single-threaded libraries. Because this causes a conflict, the Fortran Static library and the QuickWin application must both be built using static, multithreaded libraries.
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:
Static, single-threaded: libc.lib and libcd.lib
Static, multithreaded: libcmt.lib and libcmtd.lib
Dynamic-link libraries: msvcrt and msvcrtd (.lib import library and .dll)
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:
To specify static libraries, select the appropriate type of static (non-DLL) library under Run-Time Library (see /libs:static).
To specify dynamic-link libraries, select the appropriate type of DLL library under Run-Time Library (see /libs:dll).
To specify multithreaded libraries, select the appropriate type of Multi-thread library under Run-Time Library (see /threads).
To specify the debug libraries, select the appropriate type of Debug library under Run-Time Library (see /[no]dbglibs). If you specify debug libraries (/dbglibs) and also request DLL libraries (/libs:dll), be aware that this combination selects the debug versions of the Fortran DLLs. These Fortran DLL files have been linked against the C debug DLLs.
When you specify QuickWin or Standard Graphics libraries under Run-Time Library, this selection implicitly requests multithreaded libraries.
See also Building Intel® Fortran C Mixed-Language Programs on Windows* Systems.