Build C static library

Hello @ssilnicki-dev

Yes, zig init generates demo code for a working executable and working a static library callable from C.

Add the export keyword before fn to export a function using each platforms C ABI.
In your build.zig call addStaticLibrary to produce a static library .a/.lib file.

2 Likes