Skip to content

Instantly share code, notes, and snippets.

@floooh
Created January 14, 2021 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floooh/ef7063a9dabcf481e07a8e4ac6d3e9ef to your computer and use it in GitHub Desktop.
Save floooh/ef7063a9dabcf481e07a8e4ac6d3e9ef to your computer and use it in GitHub Desktop.
build.zig for hello.c
const bld = @import("std").build;
pub fn build(b: *bld.Builder) void {
const exe = b.addExecutable("hello", null);
exe.addCSourceFile("hello.c", &[_][]const u8 { "" });
exe.linkLibC();
exe.install();
b.step("run", "Run hello").dependOn(&exe.run().step);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment