On Monday, 5 September 2022 at 07:02:53 UTC, BoQsc wrote:
The problem is, D Language Compiler is not included along the
Windows Operating System.
No compiler is included natively with the Windows OS. Not even
Microsoft's.
Neither msvcr120.dll is included along the Windows Operating
System.
You have to download it. No other way.
Or... you download the DMD installer which conveniently include
it for you.
How can you download it, if your .exe binary that has the
functionality to download it, cannot even be started due to
msvcr120.dll not existing on the operating system.
I don't understand this. You need DMD to build your EXE. I
suppose you have this since your question is specifically about
DMD. If that is the case you have the DLL you need.
Copy the DLL to C:\Windows\System32\
It required administrator privilegies and this is only a
HelloWorld example
of the D language deployed on computers, where the D language
is yet to be installed.
True. In that case just distribute the DLL (taken from the DMD
bin folder) alongside the HelloWorld EXE so that both reside in
the same folder on the target computer. If you don't have
administrative priveleges you cannot modify the PATH on the
target computer either, so this is the only way. That is anyway
quite standard under Windows - if you search for msvcr*.dll on
any Windows machine you'll find lots of copies co-located with
the EXEs that use them (using the version that came with the
specific version of Visual Studio they were using to build the
EXE - for example msvcr90.dll). These DLLs are simply the Visual
Studio C/C++ Runtime distributed with Visual Studio.