www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18098] New: Issues with path to VS2017 x64 linker in sc.ini

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

          Issue ID: 18098
           Summary: Issues with path to VS2017 x64 linker in sc.ini
                    [Environment64] AFTER pull 227
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: installer
          Assignee: nobody puremagic.com
          Reporter: ParticlePeter gmx.de

sc.ini [Environment64]: the installer detects VS 2017 (%VCINSTALLDIR%, L47)
correctly but (L54) sets:

LINKCMD=%VCINSTALLDIR%\bin\HostX86\x86\link.exe

In my scenario (see bellow) this leads to following error:

fatal error C1905: Front end and back end not compatible (must target same
processor).
LINK : fatal error LNK1257: code generation failed
Error: linker exited with status 1257
dmd failed with exit code 1257.

The error does not occur when sc.ini L54 is changed to:

LINKCMD=%VCINSTALLDIR%\bin\HostX86\x64\link.exe

or

LINKCMD=%VCINSTALLDIR%\bin\HostX64\x64\link.exe

I assume that the path variable set at L62 should be change correspondingly,
but had no issues with it so far.


My scenario is a mixed c++/s project. I am linking to a c++ static library
which I build myself with VS2017 for x64 (https://github.com/ocornut/imgui).

Related:
Issue 17280
Issue 17320
https://github.com/dlang/installer/pull/227
https://forum.dlang.org/post/qffzjttlcjzlgmmhkntv forum.dlang.org

--
Dec 17 2017