zig/example/hello_world/hello_libc.zig
2019-05-26 23:35:26 -04:00

11 lines
266 B
Zig

const c = @cImport({
// See https://github.com/ziglang/zig/issues/515
@cDefine("_NO_CRT_STDIO_INLINE", "1");
@cInclude("stdio.h");
});
export fn main(argc: c_int, argv: [*]?[*]u8) c_int {
_ = c.fprintf(c.stderr, c"Hello, world!\n");
return 0;
}