I grabbed the "dmd D 2.0 compiler 1-click install for Windows" from http://www.digitalmars.com/d/download.html, installed, and tried to compile the hello world example from "The D Programming Language", i.e.
import std.stdio;
void main() {
writeln("Hello, world!");
}
with "dmd hello.d", but was met with:
hello.d(4): Error: undefined identifier writeln, did you mean function writefln?
hello.d(4): Error: function expected before (), not __error of type _error_
Is the book out of date, or did something install incorrectly, or...?
Destiny 2 is now available on the Microsoft Store and Xbox app for PC!
Type 'dmd' without any arguments and see what version you're running. You seem to be using D1. The installer probably placed the path to dmd before the path to dmd2 in your environment. Check your PATH variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With