Hi, I have a Zig 0.11 project that uses a raylib (C) dependency that is defined in the following ZON file:
.{
.name = "firefly",
.version = "0.1.0",
.dependencies = .{
.raylib = .{
.url = "https://github.com/raysan5/raylib/archive/e52ae870f297961b9ac23d2e6eca4937a24ac6c0.tar.gz",
.hash = "1220b9dc848ba1359453ce8a68fa844bcbc2cacda462b47498f12d3fd932c63390ee",
},
},
.paths = .{
"build.zig",
"build.zig.zon",
"README.md",
"src",
},
}
and the specific part in build.zig looks like this:
const exe = b.addExecutable(.{
.name = "firefly-zig",
// In this case the main source file is merely a path, however, in more
// complicated build scripts, this could be a generated file.
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
.optimize = optimize,
});
const raylib_dep = b.dependency("raylib", .{
.target = target,
.optimize = optimize,
});
exe.linkLibrary(raylib_dep.artifact("raylib"));
This worked well with Zig version 0.11. Now I updated to version 0.12 and it seems that build generates code still using old API. I get the error:
C:\Users\anhef\AppData\Local\zig\p\1220b9dc848ba1359453ce8a68fa844bcbc2cacda462b47498f12d3fd932c63390ee\src\build.zig:226:23: error: expected type ‘Build.LazyPath’, found ‘*const [12:0]u8’
lib.installHeader(“src/raylib.h”, “raylib.h”);
I already tried to remove cached data from AppData directory, but with no success. It seems that Zig still generates wrong build.zig for the dependency.
Thank you for any help.