MKoD - D Programming Language

Point Windows' to the D Compiler's location

Basic Newbie Stuff Adding the DMD's location to the Windows' "PATH" environment variable.


  • Since Windows searches for executables in the following pattern, we want to setup
    item "d" so that the D compiler can be found no matter where we're at within
    Windows' filing system trying to compile a D program:


    • a. The Current / Local Directory that the search started at
    • b. The Windows\System32 (WinNT\System32 on NT/Win2000) Directory
    • c. The Windows (WinNT on NT/Win2000) Directory
    • d. Then it follows the "PATH" environment variable
    • e. And if not found at this point a "File not found" appears.

  • 1. Click on the [Start] menu button (normally it's green),
    and from there click on the [Control Panel] menu item


    On XP's Start Menu selecting the Control Panel

  • 2. From the [Control Panel] click on the [System] selection, but you
    may need to first switch into classic mode. Of course, if you'd rather not do that,
    click on [Performance and Maintenance] and then click on the [System] item.


    XP's Control Panel in the newer Icon view

    XP's Control Panel in Classic view

  • 3. Within [System] select the [Advance] tab, and then click on
    the [Environment Variables] button.


    On the Syetem Manager selecting Environment Variables

  • 4. From the [Environment Variables] dialog-box, scroll through the items in the
    [System variables] list-box until the "Path" entry is found. Then click once on
    the "Path" entry to select it, lastly click on the [Edit] button.


    Environment Variables diabox, about to edit the Path

  • 5a. Once the [Edit System variable] dialog-box opens up, click on the [variable value]
    edit-box, then place your cursor on the very end of the current contents.


    Viewing the contents of the Path

  • 5b. Then add in D's current drive and path for the compiler, which normally is
    "C:\dmd\bin", and also, add the Digital Mars C++ compiler / linker path as well, which
    normally at "C:\dm\bin". Once that's done, click on [Ok] button, and exit out of the
    [Environment Variables], [System], and [Control Panel] windows.


    Appending additional path information to Path
Mars: fourth Rock from the Sun.