I’m want to write shared library to try zig in a new case. There’re nothing easier then building shared library, but I can’t figure out, how to emit headers in build.zig. While I’m calling lib.getEmittedH, it’s just crushing the build…
Also, haven’t found any information about emiting C-like structs.
I use zig 0.14, and 0.13 gave the same result.
I always have an option to write header myself, but I think creating proper headers from zig build would be much better solution.
P.S I’m testing building with the example library that being created by zig init.
I’ve found nothing…
I’ve written header file by hand for my task. It’s not a solution, but in this case I think it’s faster to do it by hand, then trying to fix.
Since even -femit-h doesn’t work (I didn’t managed to make it work), I think in current release it’s not possible…
Edit: If you will manage to fix it for your build, I’d like to see that. May be I’m doing something wrong…