zig std lib doesnt work with dynamic linking on linux?

This commit is contained in:
Peterino2 2026-01-03 04:01:52 -08:00
parent a0f057798e
commit df0248ec7b
1 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,7 @@ pub fn build(b: *std.Build) void {
.root_module = b.createModule(.{ .root_module = b.createModule(.{
.root_source_file = b.path("lib.zig"), .root_source_file = b.path("lib.zig"),
.target = target, .target = target,
.link_libc = true,
.optimize = optimize, .optimize = optimize,
}), }),
.linkage = .dynamic, .linkage = .dynamic,
@ -20,6 +21,7 @@ pub fn build(b: *std.Build) void {
.name = "repro", .name = "repro",
.root_module = b.createModule(.{ .root_module = b.createModule(.{
.root_source_file = b.path("main.zig"), .root_source_file = b.path("main.zig"),
.link_libc = true,
.target = target, .target = target,
.optimize = optimize, .optimize = optimize,
}), }),