diff --git a/doc/langref.html.in b/doc/langref.html.in index 5d3e1ec9b3c470f98c7f7d4059b95b2ddd25ac68..bb54a91c80b562b320dd850208ac50b6819b69ea 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -9210,20 +9210,16 @@ const Builder = @import("std").build.Builder; pub fn build(b: *Builder) void { const obj = b.addObject("base64", "base64.zig"); - const exe = b.addCExecutable("test"); - exe.addCompileFlags([_][]const u8 { - "-std=c99", - }); - exe.addSourceFile("test.c"); + const exe = b.addExecutable("test", null); + exe.addCSourceFile("test.c", [_][]const u8{"-std=c99"}); exe.addObject(obj); - exe.setOutputPath("."); - - b.default_step.dependOn(&exe.step); + exe.linkSystemLibrary("c"); + exe.install(); } {#code_end#}

terminal

$ zig build
-$ ./test
+$ ./zig-cache/bin/test
 all your base are belong to us
{#see_also|Targets|Zig Build System#} {#header_close#}