www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Phobos error

reply Jayadev <Jayadev_member pathlink.com> writes:
I am getting the following error while compiling a d hello world program.

"E:\D\dmd\dmd\src\phobos.d: module phobos cannot read file
'E:\D\dmd\dmd\src\phobos.d'"

I tried searching for the file, but there is no file like that.
please help.

kind regards, 
Jayadev
Aug 02 2005
next sibling parent Chris Sauls <ibisbasenji gmail.com> writes:
Jayadev wrote:
 I am getting the following error while compiling a d hello world program.
 
 "E:\D\dmd\dmd\src\phobos.d: module phobos cannot read file
 'E:\D\dmd\dmd\src\phobos.d'"
 
 I tried searching for the file, but there is no file like that.
 please help.
 
 kind regards, 
 Jayadev
 

Could you show your HW-program's code? I'm betting you have a line that looks something like this: # import phobos ; Am I right? If so, just remove it. Its unneccessary. -- Chris Sauls
Aug 03 2005
prev sibling parent Derek Parnell <derek psych.ward> writes:
On Wed, 3 Aug 2005 05:52:06 +0000 (UTC), Jayadev wrote:

 I am getting the following error while compiling a d hello world program.
 
 "E:\D\dmd\dmd\src\phobos.d: module phobos cannot read file
 'E:\D\dmd\dmd\src\phobos.d'"
 
 I tried searching for the file, but there is no file like that.
 please help.

This sounds like you haven't got the installation quite right. There is no "phobos.d" file as the phobos modules have been compiled and placed in a library file. Please check that ... a) You have the location of the DMD binaries and DM binaries in your PATH symbol. For example, I have this in my PATH symbol ... PATH=z:\dmd\bin;z:\dm\bin b) You have the correct configuration file for DMD. This is called "sc.ini" and in located in "dmd\bin\" folder. It should look something like this ... [Version] version=7.51 Build 020 [Environment] LIB="% P%\..\lib";\dm\lib DFLAGS="-I% P%\..\src\phobos" LINKCMD=% P%\..\..\dm\bin\link.exe c) Try the sample program listed below ... <code for 'helloworld.d' > import std.stdio; int main(char[][] args) { writefln("hello world"); writefln("args.length = %s", args.length); foreach(int idx, char[] str; args) writefln("args[%s] = '%s'", idx, str); return 0; } </code> d) I wrote a tool that makes compiling D programs easier. It's called "Build" and you can download it from DSource (which contains lots of D projects from lots of people) . Download BUILD v2.08 released 29/May/2005 from ... http://www.dsource.org/projects/build/ You can compile your D programs with it by doing this ... build helloworld You can add the -V switch to get lots of messages that might help you diagnose the problem you have. -- Derek Parnell Melbourne, Australia http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage 3/08/2005 6:42:17 PM
Aug 03 2005