79325782

Date: 2025-01-03 07:38:18
Score: 2
Natty:
Report link

In my tests, in fact,

/MT and /MD are configuration options for the runtime library settings.

/MD indicates that the runtime library is provided by the operating system as a DLL and is not embedded in the program. As a result, the compiled file is smaller. The library used is MSVCRT.lib. /MT indicates that the runtime library is embedded within the program. This results in a larger compiled file. The library used is LIBCMT.lib.

/LD is used to control the output type as a DLL, and is unrelated to the runtime library.

/MT or /MD can be used together with /LD.

enter image description here

enter image description here

========================================================================

Since /LD is used to control the output type as a DLL and is unrelated to the runtime library, it is reasonable that this option is not available below.

enter image description here

I believe that the use of /LD should be more implicit, meaning that when you choose to create a DLL project, the compiler should automatically set /LD during compilation.

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • No code block (0.5):
  • Filler text (0.5): ========================================================================
  • Low reputation (0.5):
Posted by: Zhenning Zhang