On Thu, 22 Jul 2021, Jonathan Marler wrote:
The linker errors were found by a Zig user and I took up the challenge
to fix it (original issue
here: https://github.com/ziglang/zig/issues/9364)
Zig's using clang under the hood and on top of it, it adds automatic
dynamic compilation of various libc implementations/bindings. For
windows it dynamically builds .lib files from the mingw .def files as I
understand(see
https://github.com/ziglang/zig/blob/18b8738069268cc913bbae9580d2d1
70618a2ae9/src/mingw.zig#L277). It looks like it also builds .a files
but ws2_32 seems to have been left out for some reason.
Oh, I see. Yes, that definitely explains the issue.
Some libraries (lib*crt*, libmingwex) contain a quite volatile set of
object files, and we tweak exactly which object files go into which
library (on which arch, because there are differences) regularly - I'd
hope that Zig keeps up with these changes too.
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public