www.ziglang.org icon indicating copy to clipboard operation
www.ziglang.org copied to clipboard

Fix compiling C Source code section for 0.11 docs

Open courajs opened this issue 1 year ago • 0 comments

This is correct for the master documentation, but out of date in the 0.11 docs.

https://ziglang.org/documentation/0.11.0/#Compiling-C-Source-Code vs https://ziglang.org/documentation/master/#Compiling-C-Source-Code

lib.addCSourceFile("src/lib.c", &[_][]const u8{
    "-Wall",
    "-Wextra",
    "-Werror",
});

vs

lib.addCSourceFile(.{ .file = .{ .path = "src/lib.c" }, .flags = &.{
        "-Wall",
        "-Wextra",
        "-Werror",
    } });

The other zig build system sections are correct. Can we back-port this docs change to 0.11?

courajs avatar Aug 24 '23 13:08 courajs