plan9-c

Plan9's C is a wee bit different from normal C. Here is a simple "hello world" example.

#include <u.h>
#include <libc.h>

// Step 1. COMPILE: 9c hello.c
// Step 2. LINK   : 9l -o hello hello.o

void main(void) {
  print("hi there\n");
  exits(0);
}

With the caveat that there are different compilers and linkers depending on the host system's architecture, e.g. ARM vs x86, etc.

Plan9 C resources