Compiling DMD for *nix platforms

Anders F Björklund afb at algonet.se
Mon May 5 02:13:17 PDT 2008


Anders Bergh wrote:
> On Mon, May 5, 2008 at 7:48 AM, Leo Singer <aronnax at umd.edu> wrote:
>> Does anyone know how to build DMD from source?
>>
>>  I am using gdc on Mac OS X and I am finding that it does not support all the bizarre syntax features I am throwing at it, probably because it is based on version 1 of the D language.  I'd like to try out DMD, and luckily source code comes in the archives on the download page (http://www.digitalmars.com/d/download.html).  Unfortunately, there is no build script to make the compiler, and just trying to run g++ on all the .c files in the source directory is no good.
>>
> 
> You can't compile dmd because it's not 100% open source, only the
> frontend is. 

Another reason is that DMD isn't portable, so even if you managed
to build it - it would generate code for Windows or x86 "linux".

> If you download the latest gdc code using svn then you
> can do something like this to enable D 2 support:
> 
> ./gcc/d/setup-gcc --enable-d-language=2 (or so, I don't remember)

./gcc/d/setup-gcc.sh --d-language-version=2 (see INSTALL doc)
http://dgcc.svn.sourceforge.net/svnroot/dgcc/trunk/d/INSTALL

--anders



More information about the Digitalmars-d mailing list