Navigation

main.c

This hand-written CLI proves the generated header and static library can be consumed by ordinary C code.

Source path: examples/c-codegen/main.c.

c
#include <stdio.h>

#include "config.h"
#include "generated_messages.h"

int main(void) {
  printf("%s\n", message_hello());
  return DEMO_FEATURE ? 0 : 1;
}