The Microsoft run-time library provides routines for programming for the Microsoft Windows operating system. These routines automate many common programming tasks that are not provided by the C and C++ languages.
The C standard defines a set of functions that an implementation must supply. Microsoft added various other functions for compatibility or to provide capabilities the standard functions don't address. In most cases, it will also contain quite a few "internal" functions that are used by the compiler but they are not normally exposed to the end user.
AS we can see from the table below, there are some naming conventions used:
For example, libcmt is implementations of the C standard library provided with Microsoft's compiler. They provide both "debug" and "release" versions of three basic types of libraries: single-threaded (always statically linked), multi-threaded statically linked, and multi-threaded dynamically linked.
In the name "libcmt", "libc" is the (more or less) traditional name for the C library. The "mt" means "multi-threaded". A "debug" version would have a "d" added to the end, giving "libcmtd".
C Run-time Libraries
C Run-time Library | Description | Compiler option | Preprocessor Directives |
---|---|---|---|
libc.lib | Single-threaded, static link | /ML | |
libcmt.lib | Multithreaded, static link | /MT | _MT |
msvcrt.lib | Multithreaded, dynamic link (import library for MSVCR70.DLL). To use the Standard C++ Library, we need MSVCP70.DLL. |
/MD | _MT, _DLL |
libcd.lib | Debug Single-threaded, static link | /MLd | _DEBUG |
libcmtd.lib | Debug Multithreaded, static link | /MTd | _DEBUG, _MT |
msvcrtd.lib | Debug Multithreaded, dynamic link (import library for MSVCR70D.DLL) | /MDd | _DEBUG, _MT, _DLL |