Closed meshula closed 1 year ago
Yes, that's because the self-hosted compiler is now the default, which has a different syntax for function pointers.
There's a PR here: https://github.com/floooh/sokol-zig/pull/26, but I need to figure out how to deal with the automatic binding generation during the time where both the 0.9.x and the latest 0.10.x Zig versions need to be supported (e.g. the main branch of the sokol-zig bindings should remain compatible with 0.9.x until 0.10.x is officially released, and until then, the 0.10.x bindings should go into a branch, which probably needs to be updated manually).
PS: the zig compiler has an option -fstage1
which you could try as workaround for now:
zig build -fstage1
Thanks very much! I can run with those hints.
@meshula just FYI, I just merged a PR into the branch zig-0.10.0
which updates the bindings and examples for the latest Zig dev version.
The examples required some changes (most importantly, the way asRange() is had to change (arrays now need to be passed by pointer), there seems to be a change how Zig passes arrays. But other then that it should mostly 'just work' (apart from any other changes in the self hosted compiler of course).
PS: this is the commit with the example fixes: https://github.com/floooh/sokol-zig/commit/9e22cf662623e4aefd3cb89b7fe982e30ad6d71b, and there's also some info here: https://github.com/floooh/sokol-zig/pull/26
Thanks! Much appreciated.
Things were working a month ago, but now I'm on 0.10.0-dev.3978+4fd4c733d, and getting new mystery errors ~ I was wondering if this looks like something I might be able to patch quickly, or if something more fundamental is going on here?