Did something change in Windows builds with 0.15.0-dev.1425+7ee6dab39

So, I am running CI on Windows to build Python extensions for zignal.

It was working until yesterday, but today it broke saying it can’t find msvcrt

+- install generated to lib/_zignal.pyd
   +- compile lib zignal ReleaseFast native 1 errors
error: failed to link with LLD: DllImportLibraryNotFound
error: error(link): DLL import library for -lmsvcrt not found

I wonder if this has anything to do with it: std.Target.Query: fix `WindowsVersion` format in `zigTriple()` · ziglang/zig@fcb088c · GitHub

Here’s the action that’s failing zignal/.github/workflows/python.yml at 4e716187892f6b32e11e5bdf34082cceea5a5fdb · bfactory-ai/zignal · GitHub

which calls the zig build command

Relevant log: feat(image): add image rotation with interpolation · bfactory-ai/zignal@1187ba8 · GitHub

This sounds sus to me. msvcrt.lib is not part of MinGW-w64; it’s only available when targeting *-windows-msvc with MSVC installed on the system. Note that Zig targets *-windows-gnu by default on Windows.

I don’t know, changing the zig version from master to 0.15.0-dev.1408+9b509dad3 makes it work again.

It looks like your project uses _getch and _kbhit, and your declarations for these point to msvcrt. That should probably just be c instead.

I guess this temporarily worked by accident because of Sema: Stop adding Windows implib link inputs for `extern "..."` syntax. by alexrp · Pull Request #24146 · ziglang/zig · GitHub which was later reverted in Revert "Sema: Stop adding Windows implib link inputs for `extern "..."` syntax." by alexrp · Pull Request #24707 · ziglang/zig · GitHub.

1 Like

That worked, thank you so much!