Do users need to install VS runtime redistributable if linking with Microsoft linker?

kinke via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 28 10:48:17 PDT 2015


> Maybe LDC uses dynamic linking by default and DMD static one, 
> same as on Linux?

Yes, LDC does use dynamic linking by default (as MSVC iirc). 
Static linking can be enabled by providing the 
-DLINK_WITH_MSVCRT=OFF switch to the CMake command.

> OK, but why does that need to happen? I don't get why does 
> linking with MS linker
> implies a runtime dependency.
> I thought we would be left out of these sort of problems when 
> using D :(

druntime is a layer on top of a C runtime, as redoing all of that 
low-level and platform-specific stuff in D doesn't make a lot of 
sense. Then it's just a choice of linking dynamically or 
statically against it. Doesn't have anything to do with the used 
linker.


More information about the Digitalmars-d-learn mailing list