How do you compile DMD on Windows?
Blatnik
blatblatnik at gmail.com
Sat May 1 22:44:34 UTC 2021
I wanna hack on the compiler, but I've spend 3 hours and I can't
get the damned thing to compile!
Building DMD itself was simple since there was a visual studio
project (thank you to whoever made it), but for druntime and
phobos I can't figure it out.
The instructions on https://wiki.dlang.org/Building_under_Windows
look like they're outdated.
They say to use the digitalmars make tool and not the normal make
that I have installed. Great, no problem, except it didn't come
installed with the compiler as is advertised. I don't have a make
program in D/dmd2/windows/bin and I can't find a version of it
online.
When I try to build it with regular make (not ditialmars make) I
get errors even when I follow the instructions.
Here is the output I get:
```
C:\D\druntime>make -f win64.mak -j4 lib\druntime64.lib
"\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\amd64\cl" -c
-Foerrno_c_64.obj /Z7 /I"\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110"\include
/I"\Program Files (x86)\Windows
Kits\10\Include\10.0.18362.0"\ucrt src\core\stdc\errno.c
process_begin: CreateProcess(NULL, "\Program Files
(x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\amd64\cl" -c
-Foerrno_c_64.obj /Z7 "/I\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include"
"/I\Program Files (x86)\Windows
Kits\10\Include\10.0.18362.0\ucrt" src\core\stdc\errno.c, ...)
failed.
make (e=2): The system cannot find the file specified.
make: *** [win64.mak:79: errno_c_64.obj] Error 2
```
Is there a windows hacker out there that could lend a hand? :)
More information about the Digitalmars-d-learn
mailing list