We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://ziglang.org/learn/overview/#integration-with-c-libraries-without-ffibindings
zig build test ./build.zig:8:48: error: array literal requires address-of operator to coerce to slice type '[]const []const u8' exe.addCSourceFile("test.c", [_][]const u8 {"-std=c99"});
seems slice is expected after make the following change.
const cstr = [_][]const u8{"-std=c99"} ; exe.addCSourceFile("test.c", cstr[0..1]);
another problem,
zig build test error(compilation): clang failed with stderr: /home/xxx/zig/mathtest_c/test.c:1:10: fatal error: 'mathtest.h' file not found
The text was updated successfully, but these errors were encountered:
➜ zsh git:(master) ✗ zig version 0.8.0-dev.2629+1c636e256 ➜ zsh git:(master) ✗ uname -a Linux 5.4.0-73-generic #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Sorry, something went wrong.
I believe this is caused by emit-h not being enabled in stage1 builds.
From the docs, it is
exe.addCSourceFile("test.c", &[_][]const u8{"-std=c99"});
In that case, should this be marked as a duplicate of GH-6753?
➤ zig version 0.10.0-dev.2617+47c4d4450
errors:
zig build-lib src/zigmath.zig -femit-h warning(compilation): -femit-h is not available in the stage1 backend; no .h file will be produced
No branches or pull requests
https://ziglang.org/learn/overview/#integration-with-c-libraries-without-ffibindings
zig build test
./build.zig:8:48: error: array literal requires address-of operator to coerce to slice type '[]const []const u8'
exe.addCSourceFile("test.c", [_][]const u8 {"-std=c99"});
seems slice is expected after make the following change.
another problem,
The text was updated successfully, but these errors were encountered: