On windows, even for dynamically library, linking in Visual Studio need a .lib and .dll file.
CRT (C/C++ Runtime Library) define how the standard library is linked against the binary. There are 2 standard library: the one for C, and the one for C++.
It is possible to statically link the standard library to the compiled program using /MT or dynamically using /MD.
Summary of CRT on Windows
Pro/cons of static linking (/MT): - Executable won't depend on a DLL being present on the target system - Executable will be bigger, as it embed the library - If different CRT used , there will be noticeable runtime overhead (different heap allocated for each CRT to keep track of it)
Pro/cons of static linking (/MT): - Can enjoy system updates - Smaller binary - CRT is shared among all DLL
For library development: - Creating static library .lib with /MD is the best bet, as linking with CRT is done during application linking. - Creating a dynamic library .dll with /MD cause the linking to CRT to be done at library linking. Makes the library dependant to the CRT version (and thus the Visual Studio version).
NEVER mix /MD and /MDd, because memory allocation/release is handled differently in debug and release.