We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c74cba4 commit 8a8f571Copy full SHA for 8a8f571
3 files changed
build.zig
@@ -4,13 +4,13 @@ pub fn build(b: &Builder) {
4
const exe = b.addCExecutable("main");
5
b.addCIncludePath(".");
6
exe.addCompileFlags([][]const u8 {
7
- "-std=c99"
+ "-std=c99",
8
+ "-nostdlib",
9
});
10
11
const source_files = [][]const u8 {
12
"compute_helper.c",
- "display.c",
13
- "main.c"
+ "main.c",
14
};
15
16
for (source_files) |source| {
@@ -19,6 +19,7 @@ pub fn build(b: &Builder) {
19
20
const zig_source_files = [][]const u8 {
21
"compute.zig",
22
+ "display.zig",
23
24
25
for (zig_source_files) |source| {
display.c
display.zig
@@ -0,0 +1,7 @@
1
+const std = @import("std");
2
+const printf = std.io.stdout.printf;
3
+
+export fn display_char(c: u8)
+{
+ %%printf("{c}\n", c);
+}
0 commit comments