Fix zig build test (#192)

This commit is contained in:
vent 2025-01-12 20:52:40 +00:00 committed by GitHub
parent cb9fb452c6
commit 1ef4995f82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -354,6 +354,7 @@ pub fn build(b: *std.Build) !void {
.target = target, .target = target,
.optimize = optimize, .optimize = optimize,
}); });
raylib_test.linkLibC();
const raygui_test = b.addTest(.{ const raygui_test = b.addTest(.{
.root_source_file = b.path("lib/raygui.zig"), .root_source_file = b.path("lib/raygui.zig"),
@ -361,6 +362,7 @@ pub fn build(b: *std.Build) !void {
.optimize = optimize, .optimize = optimize,
}); });
raygui_test.root_module.addImport("raylib-zig", raylib); raygui_test.root_module.addImport("raylib-zig", raylib);
raygui_test.linkLibC();
const test_step = b.step("test", "Check for library compilation errors"); const test_step = b.step("test", "Check for library compilation errors");
test_step.dependOn(&raylib_test.step); test_step.dependOn(&raylib_test.step);