www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - newbie windows setup help

reply Robert Smith <rasmith2310 gmail.com> writes:
I am attempting to compile a simple d source file using the
http://learn-programming.za.net/learn_d_programming.html site as a guide to
learning D programming.
dmd2 is installed in D:\D\dmd. When I attempt to compile I get the following
error:
D:\D\programs>dmd first.d
object.d: Error: module object is in file 'object.d' which cannot be read
import path[0] = D:\D\dmd\bin\..\..\src\phobos
import path[1] = D:\D\dmd\bin\..\..\src\druntime\import

contents of sc.ini:
[Version]
version=7.51 Build 020
[Environment]
LIB="% P%\..\lib";\dm\lib
DFLAGS="-I% P%\..\..\src\phobos" "-I% P%\..\..\src\druntime\import"
LINKCMD=% P%\link.exe

I cannot install dmd to the C: drive. What is the significance of the line:
"DFLAGS="-I% P%\..\..\src\phobos"" since there is no "src" folder?

I really like what I have read about D and would like to learn the language.

Thanks for any help.

Bob Smith
May 27 2011
parent bearophile <bearophileHUGS lycos.com> writes:
Robert Smith:

 I am attempting to compile a simple d source file using the
 http://learn-programming.za.net/learn_d_programming.html site as a guide to
 learning D programming.
 dmd2 is installed in D:\D\dmd.
Installing DMD on Windows is very easy: 1) Download the latest compiler, like dmd 2.053. 2) Unzip it into a short nice path. D:\D\dmd is OK. 3) Add the path to the windows\bin in your system path. This means adding this at the end your path: ;D:\D\dmd\windows\bin; Do you know how to add that to the system path? Then some kind of build helper is useful. Bye, bearophile
May 27 2011