'VS2022 "lld-link : error : could not open 'oldnames.lib': no such file or directory"

Just installed Windows 10 and VS2022, created an empty project, set compiler to Clang, compiled and I get these errors:

1>lld-link : error : could not open 'msvcrtd.lib': no such file or directory
1>lld-link : error : could not open 'oldnames.lib': no such file or directory

I'm sure I could add a path to the linker settings but I don't understand why this error occurs "out of the box"? Is there a bug with the VS2022 installation/surely this should not happen?



Solution 1:[1]

For could not open 'msvcrtd.lib', installing the Windos 10 SDK in Visual Studio Installer usually solves the problem. But just in case I also recommend you to read this issue.

enter image description here

About could not open 'oldnames.lib', you could refer to this issue in MSDN.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Yujian Yao - MSFT