I have the impression that there is some incompatibility between the zig version used in the example code, and for build.zig.
If I try to build with zig 0.11.0 it complains about an invalid builtin function @abs in one of the examples. So I guess the examples use zig master (which is currently 0.12.0-dev)
But if I build with zig master, then there's a problem in the submodule with your raylib bindings.
I'm using MacOS 14.0 and running the following code with both zig versions:
git clone --recurse-submodules https://github.com/ryupold/examples-raylib.zig
zig build run
zig version #0.12.0-dev.926+3be8490d8
zig build run
/Users/lklein/Downloads/examples-raylib.zig/src/raylib/raylib/src/build.zig:23:11: error: member function expected 1 argument(s), found 2
raylib.addCSourceFiles(&.{
~~~~~~^~~~~~~~~~~~~~~~
/Users/lklein/programs/zig-macos-aarch64-0.12.0-dev.926+3be8490d8/lib/std/Build/Step/Compile.zig:937:5: note: function declared here
pub fn addCSourceFiles(self: *Compile, options: AddCSourceFilesOptions) void {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
addTo: /Users/lklein/Downloads/examples-raylib.zig/src/raylib/build.zig:104:36
build: /Users/lklein/Downloads/examples-raylib.zig/build.zig:213:19
remaining reference traces hidden; use '-freference-trace' to see all reference traces
I have the impression that there is some incompatibility between the zig version used in the example code, and for
build.zig
.If I try to build with zig 0.11.0 it complains about an invalid builtin function
@abs
in one of the examples. So I guess the examples use zig master (which is currently 0.12.0-dev) But if I build with zig master, then there's a problem in the submodule with your raylib bindings. I'm using MacOS 14.0 and running the following code with both zig versions: