On 19.01.2017 21:56, Suliman wrote:
On Thursday, 19 January 2017 at 19:22:07 UTC, Rainer Schuetze wrote:


On 19.01.2017 08:32, Suliman wrote:
http://dlang.org/changelog/2.073.0.html#mscrtlib-option
How can I set this flag in dub.json? I tried:
"dflags": [ "-mscrt=msvcrt" ]
but got error:
Error: unrecognized switch '-mscrt=msvcrt'

Ouch, the switch is actually called -mscrtlib. We need to fix the
documentation...

Thanks! Now it's compile.

What version of cruntime (I tried: libcmtd, msvcrt msvcrtd) I should use
to prevent depending my project on `msvcr120.dll`. Now when I try run
vibed-based project on another PC it's give me error about absent
`msvcr120.dll`.

If you just want a single executable, the default (libcmt) is good enough. It adds the C runtime as a static library in the link step.

The DLL version of the C runtime is used with msvcrt and msvcrtd (the latter is the debug version). This is usually needed if the executable passes memory or other resources to other DLLs. Microsoft recommends to install the redistributable package in that case, e.g. https://www.microsoft.com/en-us/download/details.aspx?id=40784

Reply via email to