www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17967] New: dmd should work out of the box with Visual Studio

https://issues.dlang.org/show_bug.cgi?id=17967

          Issue ID: 17967
           Summary: dmd should work out of the box with Visual Studio
                    Developer Command Prompt
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: andre s-e-a-p.de

On a system with Visual Studio / C++ Build Tools installed, it should be
possible to extract the dmd windows archive, start the (vs) Developer Command
Prompt and directly call:
dmd test.d -m64 
or dmd test.d -m32mscoff
without the need to adapt anything within the sc.ini configuration file of dmd.

By calling the developer command prompt (e.g. vsdevcmd -arch=amd64) all
environment variables are set for the microsoft linker.

The environment variable PATH has as first argument the folder containing the
linker for the chosen architecture. The environment variable LIB contains all
folders needed.


This scenario is highly requested in a build infrastructure (XMake) where
scripts downloading the dmd archvive, extracting the archive and calling dmd.
Using the dmd windows setup routine which detects the visual studio is not
possible. Also adapting the sc.ini by the build script is really cumbersome.

The Visual Studio Developer Command Prompt should be a first citizen for dmd on
windows systems.

--
Nov 05