www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19624] New: x64 Build paths for VS 2017 are wrong after

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

          Issue ID: 19624
           Summary: x64 Build paths for VS 2017 are wrong after
                    installation. VCINSTALL is deeper
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: visuald
          Assignee: nobody puremagic.com
          Reporter: marc.arnold.bach gmail.com

Hi,
win32 is building fine but with 64 bit I have trouble libs/paths 

$VCINSTALDIR does never ever contain a /bin/linker.exe in VS2017, the folder is
much deeper and by the way I have no idea which treebranch to choose.

I tried:
C:\VisualStudio2017\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\link.exe

Even then I get:
LINK : fatal error LNK1104: cannot open file 'libucrtd.lib'

That file I found somewhere else and dropped it in the path of dmd... to find
that another lib is missing... dropping that leads to a final disaster as it
needs obviously 4 other files near by ... obviously not the way to go, without
a deeper idea of the build chain,

While it turned out to be important AND undocumented that VS needs "Visual
Studio extension development" extension I have the feeling that MSVC folder
content was created only after "Desktop development with C++ " installation in
VS => right? Should be in docu as well.

So something is broken and the installer is not able to get it right, while
setting $ environment is done by MS in the dark.

I am lost
Marc


Details:

Build Log
Building Win32\Debug\TestDApp1.exe
Command Line

set PATH=C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\VC\bin;C:\Program Files (x86)\Microsoft
Visual Studio\2017\Community\Common7\IDE;C:\Program Files (x86)\Windows
Kits\10\bin\x86;C:\Users\IBM_ADMIN\Desktop\Soft\D\dmd2\windows\bin;%PATH%
set DMD_LIB=C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\VC\lib;C:\Program Files (x86)\Windows
Kits\10\lib\10.0.14393.0\um\x86
set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\VC\
set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\
set WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
set WindowsSdkVersion=10.0.14393.0
set UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10\
set UCRTVersion=10.0.14393.0
"C:\Program Files (x86)\VisualD\pipedmd.exe" -deps Win32\Debug\TestDApp1.dep
dmd -m32mscoff -g -gf -debug -X -Xf"Win32\Debug\TestDApp1.json" -c
-of"Win32\Debug\TestDApp1.obj" TestDApp1.d
if %errorlevel% neq 0 goto reportError

set LIB=C:\Users\IBM_ADMIN\Desktop\Soft\D\dmd2\windows\bin\..\lib32mscoff
echo. >
C:\Users\IBM_ADMIN\Desktop\Moje\TestDApp1\TestDApp1\Win32\Debug\TestDApp1.link.rsp
echo "Win32\Debug\TestDApp1.obj" /OUT:"Win32\Debug\TestDApp1.exe" user32.lib 

C:\Users\IBM_ADMIN\Desktop\Moje\TestDApp1\TestDApp1\Win32\Debug\TestDApp1.link.rsp echo kernel32.lib /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\lib" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.14393.0\um\x86" /DEBUG /PDB:"Win32\Debug\TestDApp1.pdb" /INCREMENTAL:NO /NOLOGO /noopttls /NODEFAULTLIB:libcmt libcmtd.lib /SUBSYSTEM:CONSOLE >> C:\Users\IBM_ADMIN\Desktop\Moje\TestDApp1\TestDApp1\Win32\Debug\TestDApp1.link.rsp "C:\Program Files (x86)\VisualD\mb2utf16.exe" C:\Users\IBM_ADMIN\Desktop\Moje\TestDApp1\TestDApp1\Win32\Debug\TestDApp1.link.rsp "C:\Program Files (x86)\VisualD\pipedmd.exe" -msmode -deps Win32\Debug\TestDApp1.lnkdep "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\bin\link.exe" C:\Users\IBM_ADMIN\Desktop\Moje\TestDApp1\TestDApp1\Win32\Debug\TestDApp1.link.rsp if %errorlevel% neq 0 goto reportError if not exist "Win32\Debug\TestDApp1.exe" (echo "Win32\Debug\TestDApp1.exe" not created! && goto reportError) goto noError :reportError echo Building Win32\Debug\TestDApp1.exe failed! :noError Output TRACKER : error TRK0005: Failed to locate: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\bin\link.exe". The system cannot find the file specified. --
Jan 27