On Fri, May 04, 2018 at 11:29:12PM +0000, Alex via Digitalmars-d-learn wrote: > Hi > > I just installed D on my windows 10 and want to try to compile a hello > world. My source is a classical > > import std.stdio; > void main() { > writeln("Hello, World!"); > } > > And I try to compile and get > > C:\D>dmd hello.d > Error: module `hello` is in file 'hello.d' which cannot be read > import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos > import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import > > What do I do wrong ? > > D is installed at de root of C:, and the hello.d source code is at > C:\D\dmd2\sources. [...]
Where is your current directory? If hello.d is in C:\D\dmd2\sources then you need to: C: cd \D\dmd2\sources dmd hello.d T -- Life begins when you can spend your spare time programming instead of watching television. -- Cal Keegan