Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiling C Source code section for 0.11 docs #296

Open
courajs opened this issue Aug 24, 2023 · 0 comments
Open

Fix compiling C Source code section for 0.11 docs #296

courajs opened this issue Aug 24, 2023 · 0 comments

Comments

@courajs
Copy link

courajs commented Aug 24, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant