On this page:
Super C
c
cflags
ldflags
8.12

Super C🔗ℹ

Jay McCarthy <jay@racket-lang.org>

 #lang superc package: superc

This package provides a language for writing integrated C and Racket, it uses the Scribble reader.

There are a few examples in the source of this package in the "tests/superc" directory.

A Super C program may contain any number of the following calls:

syntax

(c expr ...)

Specifies some C code that is evaluated at expansion time to strings.

Each C block is appended together to construct the C source.

syntax

(cflags expr ...)

Specifies some flags to the C compiler code that is evaluated at expansion time to strings.

Each set of flags is appended together to construct the C flags.

syntax

(ldflags expr ...)

Specifies some flags to the C linker code that is evaluated at expansion time to strings.

Each set of flags is appended together to construct the LD flags.

The C portion of the Super C program is compiled and linked by GCC with the following flags:

  gcc cflags -fPIC -c c-source -o object-file

  gcc -shared ldflags object-file -o dylib-file

Warning: Super C is unsafe by nature and only tested on Linux with GCC.