MSVC detection sometimes goes wrong
-- INFO: Detected executable path at C:/Users/mlb/Documents/DEV/DEPS/c3/
-- INFO: Linker arguments: /OUT:../build/hello_world.exe /SUBSYSTEM:CONSOLE /DEBUG:FULL /LIBPATH:C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\lib\x64 /NOLOGO build/tmp/hello_world.obj build/tmp/std.ascii.obj build/tmp/std.atomic.obj build/tmp/std.core.mem.allocator.obj build/tmp/std.core.builtin.obj build/tmp/std.core.string.conv.obj build/tmp/std.core.dstring.obj build/tmp/std.core.mem.obj build/tmp/std.core.string.obj build/tmp/std.core.types.obj build/tmp/std.io.obj build/tmp/std.io.file.obj build/tmp/std.io.os.obj build/tmp/libc.obj build/tmp/std.math.obj build/tmp/std.os.backtrace.obj build/tmp/std.os.win32.obj build/tmp/std.collections.list.std.os.backtrace.Backtrace.obj dbghelp.lib kernel32.lib ntdll.lib user32.lib shell32.lib Shlwapi.lib Ws2_32.lib legacy_stdio_definitions.lib ucrtd.lib vcruntimed.lib msvcrtd.lib msvcprtd.lib to 1
lld-link: error: cannot open output file ../build/hello_world.exe: no such file or directory
Failed to create an executable: (null)
In this case VS 2022 was installed.
@C34A I think you added this?
Hi Christoffer,
I believe I did work on this. Unfortunately that was over two years ago, and I have since started university and changed fields. While I do feel some responsibility to maintain this code, I simply don't have time anymore, especially given the fact that the codebase has changed in that time and that I no longer have access to convenient windows development environment to work on this.
I'm sorry I can't offer more help, but as I recall the necessary processes to detect MSVC and associated binaries is somewhat liable to change between visual studio versions. I haven't used VS2022, but it is possible that it simply moved things and the code in utils/find_msvc.c needs updating. This may be documented, or it may be necessary to simply compare the VS versions and see what changed.
It's fine, I pinged just in case you had some idea.
This might be due to having installs in the registry?
I've updated the msvc detection now. Testers are very welcome.
I'm going to close this now and reopen it in case there are new users with this issue.