I'm trying to wrap my head around how MT and MD options are used when compiling C/C++ projects. However, without being able to expand these supposed abbreviations to meaningful phrases, I forget which one is which from one paragraph to the next. Strangely enough none of the text I've read starts by defining the M, the T and the D. What do they stand for?
These switches for cl.exe
specify which C runtime library to link against; /MT
specifies to link with LIBCMT.LIB
; /MD
specifies to link with MSVCRT.LIB
.
The different CRT libraries are described in greater detail here. The primary difference between LIBCMT
and MSVCRT
is that the former links the CRT statically into your output file, whereas MSVCRT
links to the VC runtime DLL (which, unlike its name suggests, is not MSVCRT.DLL
(see here)).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With