DMD 1 & 2 coexisting

Jesse Phillips jessekphillips at gmail.com
Thu Jul 23 19:31:31 PDT 2009


The "OS X Installer" discussion found in "Reddit: why aren't people using 
D?" turned into a discussion about having DMD version 1 and 2 work 
together on the same system.

On Thu, 23 Jul 2009 12:13:47 -0700, Bill Baxter wrote:

> On versions of linux I think there are some fancy schemes for setting up
> symlinks to particular versions to be the default.  Can't recall what
> that system was called.  "Defaults" or something like it. Anyway, seems
> like on linux dmd should work with that rather than just going and
> changing the names of exes according to whim.
> 
> --bb

Linux uses the program Alternatives. Since programs all exist in the same 
location, a program is named with its version and has a sym-link to the 
"active" version.

I have come across only one issue in using this system, dmd.conf. DMD 
will look in /etc/ or the location of the executable. Since you can't use 
the same dmd.conf for both versions, because of phobos src, both a dmd 
and dmd.conf sym-link must be created and switched to change versions (I 
use a helper script instead of alternatives).

It would be nice if you could specify a DFLAGS value for the different 
versions of dmd in the same file.



More information about the Digitalmars-d mailing list