Creating a DLL on Windows with zig cc
does not produce an import library (.lib
)
#9210
Labels
bug
Observed behavior contradicts documented or intended behavior
os-windows
zig cc
Zig as a drop-in C compiler feature
Milestone
An import library is, depressingly, still required in 2021 to link against a DLL on Windows. LLD is not yet capable of linking directly against a DLL like MinGW's linker.
Normally, when you link C code with
lld-link -dll foo.obj
, you'll get bothfoo.dll
andfoo.lib
. This also appears to be the case withzig build-lib -dynamic
. However, withzig cc -shared
, this is not the case, and-Wl,-implib:foo.lib
does not work either.The text was updated successfully, but these errors were encountered: