readme: fix build.zig example
As it turns out, it is important to link the C library also.
This commit is contained in:
parent
0b7b5e4f54
commit
136ef10775
@ -55,10 +55,10 @@ pub fn build(b: *std.Build) void {
|
||||
.root_source_file = .{.path = "my_cool_project.zig"},
|
||||
});
|
||||
|
||||
my_program.addModule(
|
||||
"nats",
|
||||
b.dependency("nats", .{}).module("nats"),
|
||||
);
|
||||
const nats_dep = b.dependency("nats", .{});
|
||||
|
||||
my_program.addModule("nats", nats_dep.module("nats"));
|
||||
my_program.linkLibrary(nats_dep.artifact("nats-c"));
|
||||
|
||||
b.installArtifact(my_program);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user