Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSVC 2015/2017 not detected on Windows 10 #2134

Closed
Wulfklaue opened this issue May 24, 2017 · 2 comments
Closed

MSVC 2015/2017 not detected on Windows 10 #2134

Wulfklaue opened this issue May 24, 2017 · 2 comments

Comments

@Wulfklaue
Copy link

Latest D, latest 1.30.0 LDC Beta1
Windows 10-64

Code:

void main() { while(true){} }

Error LDC2:

dub --compiler=C:\D2\bin\ldc2.exe Performing "debug" build using C:\D2\bin\ldc2.exe for x86_64. test ~master: building configuration "application"... \Microsoft was unexpected at this time. Error: C:\WINDOWS\system32\cmd.exe /s /c "C:\D2\bin\dumpEnv.bat amd64 > C:\Users\Benny\AppData\Local\Temp\VSCodePortableTemp\ldc_dumpEnv-a5d716" failed with status: 255 Warning: no Visual C++ installation detected OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html OPTLINK : Error 8: Illegal Filename /NOLOGO /DEBUG /OPT:REF /OPT:ICF /DEFAULTLIB:libcmt /DEFAULTLIB:libvcruntime "/OUT:.dub\build\application-debug-windows-x86_64-ldc_2073-5F07B1305EDC4D29D314A7483E40C414\test.exe" ".dub\obj\test.obj" /LIBPATH:C:/D2/bin/../lib64 phobos2-ldc.lib druntime-ldc.lib k ernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib ^ Error: C:\D\dmd2\windows\bin\link.exe failed with status: 1 C:\D2\bin\ldc2.exe failed with exit code 1.

Two Errors. First it shows no Visual C++ installation detected, when Visual Studio 2017 is installed with both 2015 and 2017 C++ packages.

Second is the Error 8: Illegal Filename.

Error LDMD2

dub --compiler=C:\D2\bin\ldmd2.exe The determined compiler type "ldc" doesn't match the expected type "dmd". This will probably result in build errors. Performing "debug" build using C:\D2\bin\ldmd2.exe for x86_64. test ~master: building configuration "application"... Linking... OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html OPTLINK : Error 8: Illegal Filename /NOLOGO /DEBUG /OPT:REF /OPT:ICF /DEFAULTLIB:libcmt /DEFAULTLIB:libvcruntime "/OUT:.dub\build\application-debug-windows-x86_64-ldc_2073-F4828069E759BD60A94BD30170C1D6B9\test.exe" ".dub\build\application-debug-windows-x86_64-ldc_2073-F4828069E759BD60A94BD30170C1 D6B9\test.obj" /LIBPATH:C:/D2/bin/../lib64 phobos2-ldc.lib druntime-ldc.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib Error: C:\D\dmd2\windows\bin\link.exe failed with status: 1 C:\D2\bin\ldmd2.exe failed with exit code 1.

Same error with the ldmd2 compiler.

@kinke
Copy link
Member

kinke commented May 24, 2017

The (single) issue appears to be that your Visual C++ installation isn't detected (and so DMD's incompatible link.exe being used as that seems to be in your PATH). Please try troubleshooting bin\msvcEnv.bat amd64, it should be all in there (registry keys being looked up etc.).

@dnadlinger dnadlinger changed the title OPTLINK : Error 8: Illegal Filename MSVC 2015/2017 not detected on Windows 10 May 24, 2017
@kinke
Copy link
Member

kinke commented Sep 6, 2017

Closing due to lack of further infos.

@kinke kinke closed this as completed Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants