[Issue 19760] Windows 10 -m64 completely broken, can't compile/run hello world

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 26 18:16:55 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19760

--- Comment #11 from kinke at gmx.net ---
> I think I've read that LIBCMT is a static version of MSVCRT.dll, but I can't confirm

I can; also see the -mscrtlib cmdline switch.

> Maybe we chose another implementation that we can ship a static library of (DMC/MUSL).

Musl on Windows? I just mentioned alternative runtimes for completeness; even
if somebody wanted to go through all that trouble, incl. adapting druntime,
there'd be still one big drawback: if you want to mix D and C(++) code and use
the same heap etc., you have to make sure both parts use the same runtime. So
any non-MSVC runtime on Windows would be an exotic and as such bad choice, just
like the DigitalMars C runtime and Optlink are (being phased out with
-m32mscoff/-m64 by default).

> This only works if you are creating an executable that you are shipping with an installer.

I was talking about the DMD installer itself - checking if the libs or a Visual
C++ (dev) installation is found, just so that the dev himself can run generated
binaries without surprises.

When redistributing you own Windows programs, you have two options - either
bundle your software with the MS DLLs, like most C++ software does, or install
Visual Studio or the Build Tools and link against the static runtime to prevent
those runtime dependencies. The latter is clearly not an option for hobbyist
devs; you surely remember all the threads of Windows users complaining about
the Visual C++ dependency for linking.

--


More information about the Digitalmars-d-bugs mailing list