Thread overview | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
February 20, 2008 how to install? | ||||
---|---|---|---|---|
| ||||
I've spent hours trying to install d and related stuff on windows xp so I can run the "hello world" example. The docs on the internet that I have found are incomplete or incorrect. Walter Bright kindly replied to my emails, but he seems not to know how to do it either. The nice book "Learning to Tango with d" has a section on installing, but it is incorrect also. I got as far as this error message when trying to compile:
>jake hello.d
object.d: module object cannot read file 'object.d'
same result with >dmd hello.d
I am not a newbie (except to d) and I know about paths, environment variables, .ini files, etc. For my first test I don't care which library I use.
Could someone post a one-paragraph description of what to download, where to
put it (what directory structure, etc), what mods to make to path or sc,ini, etc?
It should not be that difficult to describe. I've installed (without help beyond the installation instructions) and written significant programs in c, c#, lua, python, and, long ago, several other languages.
Thanks in advance to some kind person...
g.
|
February 20, 2008 Re: how to install? | ||||
---|---|---|---|---|
| ||||
Posted in reply to glen worstell | Download dmd: http://ftp.digitalmars.com/dmd.1.026.zip Download dmc: http://ftp.digitalmars.com/dmc.zip Extract dmd.1.026.zip in some directory (for instance C:\d). Extract dmc.zip in that same directory. It will probably ask you whether to overrite some files, say yes. Assuming you installed everything in C:\d, you should have something like this in your hard drive, assuming you insta: C:\d\dmd C:\d\dm Add the following paths to your PATH environment variable: C:\d\dmd\bin C:\d\dm\bin That's it. Now try dmd hello.d glen worstell escribió: > I've spent hours trying to install d and related stuff on windows xp so I can > run the "hello world" example. The docs on the internet that I have found are > incomplete or incorrect. Walter Bright kindly replied to my emails, but he > seems not to know how to do it either. The nice book "Learning to Tango with > d" has a section on installing, but it is incorrect also. I got as far as this > error message when trying to compile: > >> jake hello.d > object.d: module object cannot read file 'object.d' > > same result with >dmd hello.d > > I am not a newbie (except to d) and I know about paths, environment variables, > .ini files, etc. For my first test I don't care which library I use. > > Could someone post a one-paragraph description of what to download, where to > put it (what directory structure, etc), what mods to make to path or sc,ini, etc? > > It should not be that difficult to describe. I've installed (without help > beyond the installation instructions) and written significant programs in c, > c#, lua, python, and, long ago, several other languages. > > Thanks in advance to some kind person... > > g. > |
February 20, 2008 Re: how to install? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | Ary Borenszweig wrote:
> Download dmd: http://ftp.digitalmars.com/dmd.1.026.zip
> Download dmc: http://ftp.digitalmars.com/dmc.zip
>
> Extract dmd.1.026.zip in some directory (for instance C:\d).
> Extract dmc.zip in that same directory. It will probably ask you whether to overrite some files, say yes.
>
> Assuming you installed everything in C:\d, you should have something like this in your hard drive, assuming you insta:
>
> C:\d\dmd
> C:\d\dm
>
> Add the following paths to your PATH environment variable:
>
> C:\d\dmd\bin
> C:\d\dm\bin
>
> That's it. Now try dmd hello.d
...if he's on Windows. :-)
(and if it's Windows, be sure to use a path without spaces or funky characters in it!)
--bb
|
February 20, 2008 Re: how to install? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | Thanks, Ary, for the short, clear, and correct instructions. In seconds I was able to compile and run hello.d However, when I copy hello.d to some other directory, I get the following error message: D:\glensDocs\dmdProgs>dmd hello.d hello.d(2): module Stdout cannot read file 'tango\io\Stdout.d' At least now, thanks to your instructions, I can try out d. I'll spend some more hours determining how to use d with source code in an arbitrary directory, or maybe you or some other kind person will take a minute to describe how to set up the correct environment variables, or sc.ini, or whatever. Once I get this all sorted out, with the help of other users, I'll write it up and ask Walter to put it on his web site. Cheers, g. |
February 20, 2008 Re: how to install? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Thanks, Bill, for your post re installing d. Of course I am "on Windows", as mentioned in my post. However, your advice about spaces in the path is extremely important, if true, because lots of programs normally go in "C:\Program Files\..." I'll want to verify that before I post my short and complete instructions for newbies on installing d. This assumes that I will be able to finish the "complete" part - Ary's post didn't cover what to do about source files in directories other than the one where the sample hello.d file is located. I also think a few words for newbies about the different "standard" libraries might be in order, but I don't yet know enough to comment on that. Thanks again, g. |
February 20, 2008 Re: how to install? | ||||
---|---|---|---|---|
| ||||
Posted in reply to glen worstell | glen worstell wrote: > Thanks, Ary, for the short, clear, and correct instructions. In seconds I was able > to compile and run hello.d > > However, when I copy hello.d to some other directory, I get the following error > message: > > D:\glensDocs\dmdProgs>dmd hello.d > hello.d(2): module Stdout cannot read file 'tango\io\Stdout.d' > > At least now, thanks to your instructions, I can try out d. I'll spend some more > hours determining how to use d with source code in an arbitrary directory, or > maybe you or some other kind person will take a minute to describe how to set up > the correct environment variables, or sc.ini, or whatever. > > Once I get this all sorted out, with the help of other users, I'll write it up and > ask Walter to put it on his web site. Ok, you're trying to use the Tango library. It's not the default library that comes with DMD, and it is in fact a completely separate, incompatible runtime for D. It replaces low-level things like the built-in garbage collector. Because of that, installation of Tango is a bit more involved. If you want to use Tango, then starting from your current install, follow the instructions here: http://www.dsource.org/projects/tango/wiki/WindowsInstall --bb |
February 20, 2008 Re: how to install? | ||||
---|---|---|---|---|
| ||||
Posted in reply to glen worstell | glen worstell wrote:
> Thanks, Bill, for your post re installing d.
>
> Of course I am "on Windows", as mentioned in my post. However, your advice about
Doh! I swear I scanned your message up and down 3 times looking for any mention of platform and didn't see it. But it's 3am here and I just woke up -- so maybe that explains it. :-)
--bb
|
February 20, 2008 Re: how to install? | ||||
---|---|---|---|---|
| ||||
Posted in reply to glen worstell | == Quote from glen worstell (glen@worstell.com)'s article > Thanks, Bill, for your post re installing d. > > Of course I am "on Windows", as mentioned in my post. However, your advice about spaces in the path is extremely important, if true, because lots of programs normally go in "C:\Program Files\..." > > I'll want to verify that before I post my short and complete > instructions for newbies on installing d. This assumes that I will > be able to finish the "complete" part - Ary's post didn't cover what > to do about source files in directories other than the one where the > sample hello.d file is located. I also think a few words > for newbies about the different "standard" libraries might be in > order, but I don't yet know enough to comment on that. I know there's a rumor out there that there is more than one "standard" library. I think this is false since Phobos has always been the standard library. On the other hand, there are alternate runtime libraries (Tango being the most popular alternate runtime library). I haven't read the Tango book, so I wouldn't know much about it. Does it require you to install Tango to learn D? I don't know if that's the best way to learn D. Perhaps there's some documentation at the Tango website that will help you get installed and set up. That'd be great news. Also, you might be able to get some more information about Tango in their forums and through IRC: http://www.dsource.org/projects/tango/wiki/Contact But using Tango may not be the best way for a newbie to start out with D. It might be easier to start out learning D by learning Phobos. YYMV. |
February 20, 2008 Re: how to install? | ||||
---|---|---|---|---|
| ||||
Posted in reply to jcc7 | jcc7 Wrote: > == Quote from glen worstell (glen@worstell.com)'s article > > Thanks, Bill, for your post re installing d. > > > > Of course I am "on Windows", as mentioned in my post. However, your advice about spaces in the path is extremely important, if true, because lots of programs normally go in "C:\Program Files\..." > > > > I'll want to verify that before I post my short and complete > > instructions for newbies on installing d. This assumes that I will > > be able to finish the "complete" part - Ary's post didn't cover what > > to do about source files in directories other than the one where the > > sample hello.d file is located. I also think a few words > > for newbies about the different "standard" libraries might be in > > order, but I don't yet know enough to comment on that. > > I know there's a rumor out there that there is more than one "standard" library. I think this is false since Phobos has always been the standard library. I'd love to start saying things, but it's not my language, and not my place to tell Walter how to do things. > On the other hand, there are alternate runtime libraries (Tango being the most popular alternate runtime library). > > I haven't read the Tango book, so I wouldn't know much about it. Does it require you to install Tango to learn D? I don't know if that's the best way to learn D. If you want to "Learn to Tango with D" I can imagine it would be very beneficial to install Tango. > Perhaps there's some documentation at the Tango website that will help you get installed and set up. That'd be great news. Also, you might be able to get some more information about Tango in their forums and through IRC: http://www.dsource.org/projects/tango/wiki/Contact > > But using Tango may not be the best way for a newbie to start out with D. It might be easier to start out learning D by learning Phobos. YYMV. I think you need to make a big distinction. D is a programming language. Phobos and Tango are libraries. Standard system libraries like Phobos and Tango are almost part of the language, but they're not. I learned most everything I know about D by reading the DMD 1.0 specification document(1). For instance, if you know Java, it's technically possible to run javac without the JDK. You won't have access to base functionality like an interface to use the base object class, but you can create real bytecode which does real things in a real Java Runtime Environment. Likewise, you can compile D without Phobos or Tango. You won't have the object.d interface to the object structure, and you won't be able to do hardly anything, but you can compile real code into real executables which do real things on real processors. As a system library I think Tango is better. Others prefer Phobos. Someone should combine the two and make a new library called Demos (after Mars' other moon). I don't have the time, so I won't complain. But you should make the distinction between D and the library. They're very different things. That's of course assuming that there isn't some hidden magic functionality which needs otherwise. But my Java example still holds (how else could they build JRuby?) (1) http://www.prowiki.org/wiki4d/wiki.cgi?LanguageSpecification |
February 20, 2008 Re: how to install? | ||||
---|---|---|---|---|
| ||||
Posted in reply to jcc7 | On Wed, 20 Feb 2008 20:05:47 +0000, jcc7 wrote:
> == Quote from glen worstell (glen@worstell.com)'s article
>> Thanks, Bill, for your post re installing d.
>>
>> Of course I am "on Windows", as mentioned in my post. However, your advice about spaces in the path is extremely important, if true, because lots of programs normally go in "C:\Program Files\..."
>>
>> I'll want to verify that before I post my short and complete instructions for newbies on installing d. This assumes that I will be able to finish the "complete" part - Ary's post didn't cover what to do about source files in directories other than the one where the sample hello.d file is located. I also think a few words for newbies about the different "standard" libraries might be in order, but I don't yet know enough to comment on that.
>
> I know there's a rumor out there that there is more than one "standard" library. I think this is false since Phobos has always been the standard library.
>
> On the other hand, there are alternate runtime libraries (Tango being the most popular alternate runtime library).
>
> I haven't read the Tango book, so I wouldn't know much about it. Does it require you to install Tango to learn D? I don't know if that's the best way to learn D. Perhaps there's some documentation at the Tango website that will help you get installed and set up. That'd be great news. Also, you might be able to get some more information about Tango in their forums and through IRC: http://www.dsource.org/projects/tango/wiki/Contact
>
> But using Tango may not be the best way for a newbie to start out with D. It might be easier to start out learning D by learning Phobos. YYMV.
jcc7,
True Tango is not a standard library, however it has been embraced by a
large portion of the community, weather it official or not new users will
run into the same problems if it was official (in fact I think it would
be simpler if there were two official standard libraries). As for the
last point, I think Tango might be the best library for a newbie to start
out with, excluding the more difficult setup, because there is a book
teaching it.
As a side note the book only requires a tango install because it uses Stdout for output during the D introduction portion.
|
Copyright © 1999-2021 by the D Language Foundation