b184ae5ca5
See #1003
15 lines
331 B
Zig
15 lines
331 B
Zig
const c = @cImport({
|
|
// See https://github.com/ziglang/zig/issues/515
|
|
@cDefine("_NO_CRT_STDIO_INLINE", "1");
|
|
@cInclude("stdio.h");
|
|
@cInclude("string.h");
|
|
});
|
|
|
|
const msg = c"Hello, world!\n";
|
|
|
|
export fn main(argc: c_int, argv: &&u8) c_int {
|
|
if (c.printf(msg) != c_int(c.strlen(msg))) return -1;
|
|
|
|
return 0;
|
|
}
|