4 ms·
Thanks for your hard work. Can you please add, if you have time, a few lines (the commands required) for building the compiler from source ?
by AlexeyBrin 8y ago
Thanks for your hard work.
Can you please add, if you have time, a few lines (the commands required) for building the compiler from source ?
- WalterBright 8y agomake clean make scppn
- AlexeyBrin 8y agoThanks, I've installed DMD and DMC, when I try to build the compiler I get a compilation error: .\code.d(16): Error: module `cc` is in file 'ddmd\backend\cc.d' which cannot be read
- WalterBright 8y agoSeems I haven't tried to build it from the github in a while. code.d was missing from the makefile command to update github. Fixed.
- AlexeyBrin 8y agoPrevious error is now fixed. New error: dmd -c -betterC -noboundscheck -mv=dmd.backend=. -mv=tk=tk -version=SCPP -O -release -inline dt.d -ofdth.obj dt.d(36): Error: TypeInfo cannot be used with -betterC --- errorlevel 1 --- errorlevel 1
- sigzero 8y agoThere are probably better ways to do this.
- WalterBright 8y agoHmm, looks like you're using the latest dmd. I've been using 2.074. I suggest switching to 2.074, or wait until I get it working properly with the latest dmd.
- AlexeyBrin 8y agoYes, I've tried to build dmc using the latest dmd. I will try with 2.074 and report back
- AlexeyBrin 8y agoI've checked with 2.074.0 and 2.074.1, no joy, but a new error: dmd -c -betterC -noboundscheck -mv=dmd.backend=. -mv=tk=tk -version=SCPP -O -release -inline -J. dfile.d dfile.d(854): Error: static variable stdout cannot be read at compile time BTW, I did all my tests on a clean Windows machine with nothing else installed.
- WalterBright 8y agoI don't know why that is happening on your setup. You can try replacing 'stream' on the next line with 'stdout', and remove the enum declaration.
- AlexeyBrin 8y agoThe code seems to pass the compiler now, I get an error in the link phase: c:\dmc\dm\bin\link /de @scppn.lnk OPTLINK (R) for Win32 Release 8.00.13 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html err.obj(err) Error 42: Symbol Undefined _stdout c:\dmc\dm\lib\NTSTUB.EXE Warning 2: File Not Found c:\dmc\dm\lib\NTSTUB.EXE Maybe you are using a more complete version of the C++ compiler (or some other utilities) than what is available for free on the Digital Mars website. Another potential problem is that I don't have Visual Studio installed on this machine. On a more positive note, I think I will give D a try after this experience.
- WalterBright 8y agoI think I had edited core.stdc.stdio Try defining stdout as this: enum stdout = &_iob[1]; in core\stdc\stdio.d