Status of Win64 DMD/MSVC path situation?

Brad Anderson eco at gnuk.net
Wed Sep 25 10:01:33 PDT 2013


On Wednesday, 25 September 2013 at 16:42:22 UTC, Nick Sabalausky 
wrote:
> On Wed, 25 Sep 2013 18:29:45 +0200
> "Brad Anderson" <eco at gnuk.net> wrote:
>
>> On Wednesday, 25 September 2013 at 16:26:14 UTC, Nick 
>> Sabalausky wrote:
>> > I know there's been some work/discussion regarding 
>> > improvements to how
>> > DMD/sc.ini/whatever handles the paths for MSVC for Win64 
>> > builds. I
>> > haven't been following that closely, so I wanted to ask: 
>> > What's the
>> > current state of that? Is it decided how 2.064 is going to 
>> > deal with
>> > that, and if so, how exactly?
>> 
>> https://github.com/D-Programming-Language/dmd/pull/2509
>> 
>> It was closed with several people asking that Walter use 
>> [Environment64] instead of LIBPATH64.  Walter hasn't replied 
>> so it's a bit in limbo.
>
> Hmm, ok. Am I correct in understanding that, for the average 
> user, the
> that'll be an inconsequential decision and *regardless* of how 
> sc.ini
> works the only thing they'll (hopefully) need to worry about is 
> setting
> their environment's %VCINSTALLDIR% and %WindowsSdkDir% vars?

Not quite.  The tail of the path changes with VC versions.  I've 
modified the installer to detect VS and adjust sc.ini 
accordingly: 
https://github.com/D-Programming-Language/installer/pull/22

This will make it pretty simple for those using the installer.  I 
think I'm going to ask Walter to ship an sc.ini more like this 
sc.ini Rainer posted[1] and adjust the installer accordingly:

---

; environment for both 32/64 bit
[Environment]
LIB="%@P%\..\lib"
DFLAGS="-I%@P%\..\..\src\phobos" 
"-I%@P%\..\..\src\druntime\import"
LINKCMD=%@P%\link.exe

[Environment64]
; VS2008 and VS2012
LINKCMD64=%VCINSTALLDIR%\bin\amd64\link.exe

; VS2012
; LINKCMD64=%VCINSTALLDIR%\bin\x86_amd64\link.exe

; needed with /DEBUG to find mspdb*.dll
PATH=%PATH%;%VCINSTALLDIR%\bin\x86_amd64;%VCINSTALLDIR%\..\Common7\IDE

; needed to avoid COMDAT folding (bugzilla 10664)
DFLAGS=%DFLAGS% -L/OPT:NOICF

LIB="%@P%\..\lib64"

;;;; search path for C Runtime libraries
; the following lib path works with VS2008, VS2010 and VS2012
LIB=%LIB%;"%VCINSTALLDIR%\lib\amd64"

;;;; search path for Platform libraries
; the following lib path works with Windows SDK 6.x and 7.x
LIB=%LIB%;%WindowsSdkDir%\Lib\x64

; the following lib path works with Windows SDK 8.0
LIB=%LIB%;%WindowsSdkDir%\Lib\win8\um\x64

---

That sc.ini is much more helpful to people editing by hand (as 
well as takes care of some bugs I wasn't aware of).

1. http://forum.dlang.org/post/l10vtc$76o$1@digitalmars.com


More information about the Digitalmars-d mailing list