I have been trying to upgrade to Swift 5.3. When I build something (cross‐compiling out of WSL with SwiftPM), the build succeeds, but when I try to launch the executable (back in Windows), I get this error:
.build/x86_64-unknown-windows-msvc/release/WindowsTests.exe: error while loading shared libraries: api-ms-win-crt-string-l1-1-0.dll: cannot open shared object file: No such file or directory
I am confused for two reasons.
- I never saw this error with Swift 5.2, but it was presumably using the DLL too.
- I already know the DLL originates from
C:\Program Files (x86)\Windows Kits\10\Redist\10.0.19041.0\ucrt\DLLs\x64\api-ms-win-crt-string-l1-1-0.dll, but that hasn’t ended up being much help. I added that to
PATHand it still couldn’t be found. Even when I copied it next to the executable (into
.build\x86_64-unknown-windows-msvc\release), it still couldn’t be found. Why might the loader seem to be ignoring the standard DLL search patterns?
I’m probably just holding it wrong, but any advice on how to fix it would be appreciated.