DVM allows you to easily download and install D compilers and manage different versions of the
compilers. When you switch D compiler with the use
command the compiler will only be
available in the current shell. This allows you to have one version of the compiler in one
shell and another version in another shell. For example, have a D1 version in one shell and a
D2 version in another.
- Download the DVM tool from: https://github.com/jacob-carlborg/dvm/releases
- Add executable permissions to the downloaded file.
- Run the installation:
$ ./<dvm> install dvm
(where<dvm>
is the name of the downloaded file)
$ curl -L -o dvm https://github.com/jacob-carlborg/dvm/releases/download/v0.5.1/dvm-0.5.1-macos && chmod +x dvm && ./dvm install dvm
$ curl -L -o dvm https://github.com/jacob-carlborg/dvm/releases/download/v0.5.1/dvm-0.5.1-linux-ubuntu14.04-x86_64 && chmod +x dvm && ./dvm install dvm
$ curl -L -o dvm https://github.com/jacob-carlborg/dvm/releases/download/v0.4.4/dvm-0.4.4-linux-debian6-x86 && chmod +x dvm && ./dvm install dvm
$ curl -L -o dvm https://github.com/jacob-carlborg/dvm/releases/download/v0.4.4/dvm-0.4.4-freebsd-pcbsd9.1-x86_64 && chmod +x dvm && ./dvm install dvm
Follow the general installation instructions. https://github.com/jacob-carlborg/dvm/releases/download/v0.5.1/dvm-0.5.0-win32.exe
It might be necessary to do a complete clean installation by removing ~/.dvm. This is in particular if you had any problems with the previous shell scripts not working.
- Install a D compiler (DMD):
$ dvm install 2.068.1
- Install a D compiler (DMD) with Tango as the standard library:
$ dvm install 1.072 -t
- Use a D compiler (DMD):
$ dvm use 2.068.1
- Use a D compiler (DMD) and set it to default:
$ dvm use 2.068.1 -d
- Show usage information:
$ dvm -h
The source code is available under the Boost Software License 1.0
- Currently DMD is the only supported compiler
- On Windows DVM does not work in the PowerShell prompt, only in cmd. Although,
it is possible to set a default compiler,
dvm use <version> -d
, in cmd and then use the compiler in the PowerShell prompt.
- Run Dub in the directory of the cloned repository:
$ dub build