getting started in D

Anders F Björklund afb at algonet.se
Sun May 11 00:49:20 PDT 2008


Erik Lechak wrote:

> I decided to use gdc ( maybe this was the first problem? ).  Is gdc
> behind the times with respect to the dmd compiler?  I noticed that
> the standard library (phobos) was missing several functions that are
> documented here: http://www.digitalmars.com/d/2.0/phobos/phobos.html
> 
> "std.string.startsWith" and "std.process.shell" are two that I recall
> being missing.

If you are using the D1 language, then you need to instead look at:
http://www.digitalmars.com/d/1.0/phobos/phobos.html

> I used a standard debian gdc install.  I have the directory
> /usr/include/d/4.1  and a link /usr/include/d/4.1.3 that links back
> to 4.1.  All the files appear to be there but they are missing
> functionality.  Am I using the wrong libraries?  Is there a better or
> more up to date Phobos library?

The debian package uses version 1 of the D language, probably
since version 2 is still in an alpha stage and changing rapidly...

You might also want to take a peek at the Tango library instead ?
http://dsource.org/projects/tango/ (it replaces the Phobos library)

> Happily I got a program to compile and run ... wooohooo ... So I
> tried to get fancy and write my own module.  It took me a while, but
> I finally figured out I needed a build tool to do an "automated"
> build (like javac does).  So I tried to compile "build" / "bud"
> version 3.04.  It failed to compile.  So I spent some time fixing
> "bud" and got it to compile.  Now it runs fine.
> 
> Since "bud" didn't want to compile out of the box, I have to assume
> that it is not the approved method of compiling D code.  So what is
> the recommended way to compile D code?  Is anyone interested in my
> modified version of "bud" that compiles under gdc?  Does "bud"
> compile with dmd without problems?

The "bud" tool is mostly for DMD, the "rebuild" tool from DSSS works
better with GDC. Both uses version(build) and accomplish same thing.

--anders



More information about the Digitalmars-d mailing list