Closed clsource closed 7 months ago
So I asked in Zig discord about this, and this was the response.
From: tomck5836 https://discord.com/channels/605571803288698900/1036403458305163384/1229840153279725618
Normally this kind of error occurs when you're trying to import a c header which contains complex stuff like macros, or static/inline functions which zig cannot properly translate to zig
Does libagar intentionally provide zig support? If not, they can't do anything to help + you're best off deleting the issue. This is not a problem with libagar (unless they explicitly say they support zig)
your options are:
The @cImport
stuff is just a shortcut that zig has to automatically try and import c headers. You can just write your own bindings with export fn (...), getting all the function signatures to match up.
So I guess for properly using libagar with zig I have to create zig bindings 💯
Hello, I'm experimenting with Agar and Zig lang. For some reason I cannot compile.
It seems something undefined in
AG_TAILQ_LAST
,AG_TAILQ_PREV
andAGOBJECT_LAST_CHILD
.These are some errors I got:
To replicate these are the files I am using:
Makefile
build.zig
src/main.zig
How to replicate
Create the files and then execute
make build
.