Well, I tried all your suggestions.
(Actually re-tried a few times.)
Thanks, Laurent and Kagamin!

On Friday, 10 August 2018 at 14:47:04 UTC, Laurent Tréguier wrote:
Did you have a look at the wiki ? It looks like the image shows what needs to be installed:
https://wiki.dlang.org/Installing_DMD#Installing_the_Microsoft_toolchain

This was most close to solving my problem.  Thanks!

I've installed the components shown in wiki image: v141 tools and the SDKs.

The sc.ini information in the wiki looks outdated.
At least the sc.ini from the .7z archive is much cleaner than it used to be.
The whole 64-bit section looks like this:
~~~~~
[Environment64]
LIB=%@P%\..\lib64
; needed to avoid COMDAT folding (bugzilla 10664)
DFLAGS=%DFLAGS% -L/OPT:NOICF
~~~~~

So I proceeded with the wiki instructions:
to find and run a 64-bit Visual Studio command prompt,
to ask the environment variables from there.

And Visual Studio 2017 brings new tricky paths to handle.

Here is how my sc.ini 64-bit section looks now, when everything seems to work:
~~~~~
[Environment64]
LIB=%@P%\..\lib64
; needed to avoid COMDAT folding (bugzilla 10664)
DFLAGS=%DFLAGS% -L/OPT:NOICF

; here are the actual paths
VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10\
UCRTVersion=10.0.17134.0

; here is the actual version
LINKCMD=%VCINSTALLDIR%\Tools\MSVC\14.14.26428\bin\HostX64\x64\link.exe

; needed with /DEBUG to find mspdb*.dll (only for VS2012 or later)
PATH=%PATH%;%VCINSTALLDIR%\bin\HostX64\x64
~~~~~

Specifically, LINKCMD part deviates from the instructions.
The linker is now buried deeper into \Tools\MSVC\14.14.26428\bin\HostX64\x64\. Yep, that contains a version number too, which may change with each update.
Meanwhile, the tutorial suggests just the following:
LINKCMD=%VCINSTALLDIR%\bin\x86_amd64\link.exe

Anyway, now 64-bit linking seems to be working, so I'll stop digging.

Ivan Kazmenko.

Reply via email to