www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - problem with compling

reply Dnoob <check3x yahoo.com> writes:
I've wrote program in D which outputs "Hello D!", I saved it as hello.d
however, when I try to compile it using dmd, it outputs like this.

C:\dten>dmd hello.d 
object.d: module object cannot read file 'object.d'

Someone please help me! :(
Jul 12 2007
next sibling parent mandel <foo bar.com> writes:
Dnoob Wrote:

 I've wrote program in D which outputs "Hello D!", I saved it as hello.d
however, when I try to compile it using dmd, it outputs like this.
 
 C:\dten>dmd hello.d 
 object.d: module object cannot read file 'object.d'
 
 Someone please help me! :(
dmd can't find the standard lib folder. You need to adjust your environment path variables. Since I'm not familiar with Windows, I can't give you a better advice.
Jul 12 2007
prev sibling parent BCS <ao pathlink.com> writes:
Reply to Dnoob,

 I've wrote program in D which outputs "Hello D!", I saved it as
 hello.d however, when I try to compile it using dmd, it outputs like
 this.
 
 C:\dten>dmd hello.d object.d: module object cannot read file
 'object.d'
 
 Someone please help me! :(
 
The short answer is to dump the whole dmd.zip at the c:\ root directory (or whatever drive you want) then put c:\dmd\bin in PATH. Also it sometimes helps to do the same with the dmc distribution and add c:\dm\bin to PATH. Just dump it on top of the first file and nothing important gets over written. This can be done in other directories but I have allows had trouble getting things to work right.
Jul 12 2007