digitalmars.D.learn - Module stdio cannot read file 'std\stdio.d'
- GS Tan (12/12) May 02 2007 I am running MS Windows XP.
- Derek Parnell (25/45) May 02 2007 So am I.
- GS Tan (10/72) May 03 2007 Thanks for your reply Derek. Appreciate your reply. I went to \dmd\bin a...
- GS Tan (3/35) May 06 2007 Thanks. I will try it out. Will inform you of the result.
I am running MS Windows XP. I have just installed D compiler (dmd.zip) with linkers (dmc.zip) and setup the system variables. I tried the test routine: main() {} and dmd.exe was able to compiled. There are two different directories for compiler (\dmd) and linker (\dm), where readme.txt for for dmd.zip and dmc.zip does not specify. Anyway, I included into PATH, the path to drive:\dm\include; and drive:\dm\lib. I wrote the program "Hello there" to test out stdio. import std.stdio ; main() { writef ("Hello there!\n") ; } This is the error I see. When I checked \dm\include, I see the file "stdio.h" and not "stdio.d". What is the problem? Can you pls help me and maybe advise me as to whether I downloaded the correct file. Thanks..GS
May 02 2007
On Wed, 02 May 2007 20:56:41 -0400, GS Tan wrote:I am running MS Windows XP.So am I.I have just installed D compiler (dmd.zip) with linkers (dmc.zip) and setup the system variables. I tried the test routine: main() {} and dmd.exe was able to compiled. There are two different directories for compiler (\dmd) and linker (\dm), where readme.txt for for dmd.zip and dmc.zip does not specify. Anyway, I included into PATH, the path to drive:\dm\include; and drive:\dm\lib.You do not need to have dm\include or dm\lib in the PATH symbol. You only need dmd\bin and dm\bin to be in there.I wrote the program "Hello there" to test out stdio. import std.stdio ; main() { writef ("Hello there!\n") ; }I guess you mean "void main()" ... <g>This is the error I see. When I checked \dm\include, I see the file "stdio.h" and not "stdio.d". What is the problem?The D programming language does not use .h (C header files) at all. The stdio.d should be located in "dmd\src\phobos\std"Can you pls help me and maybe advise me as to whether I downloaded the correct file.Things look okay from your description here. The message does mean that the compile can't find the stdio.d file though. The way it knows where to look is that it uses the sc.ini file which should be in dmd\bin and uses the line ... DFLAGS="-I% P%\..\src\phobos" The -I switch tells the compiler where to look for import files. In the standard installation case, the '% P%' is translated as the path of the DMD compiler. Try this ... dmd test.d -I<drive>:\dmd\src\phobos -- Derek (skype: derek.j.parnell) Melbourne, Australia "Justice for David Hicks!" 3/05/2007 11:04:50 AM
May 02 2007
Thanks for your reply Derek. Appreciate your reply. I went to \dmd\bin and checked sci.ini. The -I switch is there. This is the sci.ini file content: [Version] version=7.51 Build 020 [Environment] LIB="% P%\..\lib";\dm\lib DFLAGS="-I% P%\..\src\phobos" LINKCMD=% P%\..\..\dm\bin\link.exe Is there another other way to direct the compiler to the stdio library? Appreciate your help to get me started. Thanks..GS Derek Parnell Wrote:On Wed, 02 May 2007 20:56:41 -0400, GS Tan wrote:I am running MS Windows XP.So am I.I have just installed D compiler (dmd.zip) with linkers (dmc.zip) and setup the system variables. I tried the test routine: main() {} and dmd.exe was able to compiled. There are two different directories for compiler (\dmd) and linker (\dm), where readme.txt for for dmd.zip and dmc.zip does not specify. Anyway, I included into PATH, the path to drive:\dm\include; and drive:\dm\lib.You do not need to have dm\include or dm\lib in the PATH symbol. You only need dmd\bin and dm\bin to be in there.I wrote the program "Hello there" to test out stdio. import std.stdio ; main() { writef ("Hello there!\n") ; }I guess you mean "void main()" ... <g>This is the error I see. When I checked \dm\include, I see the file "stdio.h" and not "stdio.d". What is the problem?The D programming language does not use .h (C header files) at all. The stdio.d should be located in "dmd\src\phobos\std"Can you pls help me and maybe advise me as to whether I downloaded the correct file.Things look okay from your description here. The message does mean that the compile can't find the stdio.d file though. The way it knows where to look is that it uses the sc.ini file which should be in dmd\bin and uses the line ... DFLAGS="-I% P%\..\src\phobos" The -I switch tells the compiler where to look for import files. In the standard installation case, the '% P%' is translated as the path of the DMD compiler. Try this ... dmd test.d -I<drive>:\dmd\src\phobos -- Derek (skype: derek.j.parnell) Melbourne, Australia "Justice for David Hicks!" 3/05/2007 11:04:50 AM
May 03 2007
Reply to GS,Thanks for your reply Derek. Appreciate your reply. I went to \dmd\bin and checked sci.ini. The -I switch is there. This is the sci.ini file content:the file should be "sc.ini" not "sci.ini" that might be your problem right there.[Version] version=7.51 Build 020 [Environment] LIB="% P%\..\lib";\dm\lib DFLAGS="-I% P%\..\src\phobos" LINKCMD=% P%\..\..\dm\bin\link.exeI'd hard code the paths. If things don't move it is a little more reliable. LIB=c:\dmd\lib;c:\dm\lib DFLAGS="-Ic:\dmd\src\phobos" LINKCMD=c:\dm\bin\link.exeIs there another other way to direct the compiler to the stdio library?you can have more than one sc.ini http://www.digitalmars.com/d/dcompiler.html#sc_ini
May 03 2007
BCS Wrote:Reply to GS,Thanks. I will try it out. Will inform you of the result. ..GSThanks for your reply Derek. Appreciate your reply. I went to \dmd\bin and checked sci.ini. The -I switch is there. This is the sci.ini file content:the file should be "sc.ini" not "sci.ini" that might be your problem right there.[Version] version=7.51 Build 020 [Environment] LIB="% P%\..\lib";\dm\lib DFLAGS="-I% P%\..\src\phobos" LINKCMD=% P%\..\..\dm\bin\link.exeI'd hard code the paths. If things don't move it is a little more reliable. LIB=c:\dmd\lib;c:\dm\lib DFLAGS="-Ic:\dmd\src\phobos" LINKCMD=c:\dm\bin\link.exeIs there another other way to direct the compiler to the stdio library?you can have more than one sc.ini http://www.digitalmars.com/d/dcompiler.html#sc_ini
May 06 2007
BCS Wrote:Reply to GS,Thanks. I will try it out. Will inform you of the result. ..GSThanks for your reply Derek. Appreciate your reply. I went to \dmd\bin and checked sci.ini. The -I switch is there. This is the sci.ini file content:the file should be "sc.ini" not "sci.ini" that might be your problem right there.[Version] version=7.51 Build 020 [Environment] LIB="% P%\..\lib";\dm\lib DFLAGS="-I% P%\..\src\phobos" LINKCMD=% P%\..\..\dm\bin\link.exeI'd hard code the paths. If things don't move it is a little more reliable. LIB=c:\dmd\lib;c:\dm\lib DFLAGS="-Ic:\dmd\src\phobos" LINKCMD=c:\dm\bin\link.exeIs there another other way to direct the compiler to the stdio library?you can have more than one sc.ini http://www.digitalmars.com/d/dcompiler.html#sc_ini
May 06 2007