www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Can't figure out how to use the compiler

reply "Plorf" <dane.flyger1 gmail.com> writes:
I downloaded the DMD Windows compiler, installed it in the 
default directory, added its location to the system path, 
restarted my computer and wrote a sample "hello, world" program, 
and it won't compile; instead it says "Error: cannot read file 
hello.d". My computer is 64-bit, if that matters at all. Can 
someone please explain how to get the DMD compiler to work or 
provide some links? This has really been frustrating me. Thanks.
Apr 21 2014
next sibling parent "Aleksandar Ruzicic" <aleksandar ruzicic.info> writes:
On Monday, 21 April 2014 at 19:40:01 UTC, Plorf wrote:
 I downloaded the DMD Windows compiler, installed it in the 
 default directory, added its location to the system path, 
 restarted my computer and wrote a sample "hello, world" 
 program, and it won't compile; instead it says "Error: cannot 
 read file hello.d". My computer is 64-bit, if that matters at 
 all. Can someone please explain how to get the DMD compiler to 
 work or provide some links? This has really been frustrating 
 me. Thanks.

Are you in the same directory as your hello.d? It seems like you're not giving the compiler correct path to your file.
Apr 21 2014
prev sibling next sibling parent "Plorf" <dane.flyger1 gmail.com> writes:
 Are you in the same directory as your hello.d? It seems like 
 you're not giving the compiler correct path to your file.

My file was located on my desktop, and my current directory was the desktop, but "dmd hello.d" gave me an error. Is that what you mean?
Apr 21 2014
prev sibling next sibling parent "anonymous" <anonymous example.com> writes:
On Monday, 21 April 2014 at 19:40:01 UTC, Plorf wrote:
 I downloaded the DMD Windows compiler, installed it in the 
 default directory, added its location to the system path, 
 restarted my computer and wrote a sample "hello, world" 
 program, and it won't compile; instead it says "Error: cannot 
 read file hello.d". My computer is 64-bit, if that matters at 
 all. Can someone please explain how to get the DMD compiler to 
 work or provide some links? This has really been frustrating 
 me. Thanks.

Does `dmd` without any arguments print the usual kerfuffle (version, copyright, usage)? Could it be that the file is called "hello.d.txt" and the extension is hidden? What does `dir hello.d` say?
Apr 21 2014
prev sibling next sibling parent "Plorf" <dane.flyger1 gmail.com> writes:
On Monday, 21 April 2014 at 21:49:39 UTC, anonymous wrote:
 On Monday, 21 April 2014 at 19:40:01 UTC, Plorf wrote:
 I downloaded the DMD Windows compiler, installed it in the 
 default directory, added its location to the system path, 
 restarted my computer and wrote a sample "hello, world" 
 program, and it won't compile; instead it says "Error: cannot 
 read file hello.d". My computer is 64-bit, if that matters at 
 all. Can someone please explain how to get the DMD compiler to 
 work or provide some links? This has really been frustrating 
 me. Thanks.

Does `dmd` without any arguments print the usual kerfuffle (version, copyright, usage)? Could it be that the file is called "hello.d.txt" and the extension is hidden? What does `dir hello.d` say?

Apr 21 2014
prev sibling parent "Plorf" <dane.flyger1 gmail.com> writes:
Sorry about that last comment. Apparently I installed it 
correctly and everything, it's just that Notepad++ saves files as 
.txt unless you surround the file name and extension in quotes, 
like so: "hello.d" Thanks a lot for the help.
Apr 21 2014