On this page:
c
cflags
ldflags

Super C

Jay McCarthy <jay@plt-scheme.org>

 (require (planet jaymccarthy/superc:2:0/lang))

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

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

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

(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.

(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.

(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 -m32 cflags -c c-source -o object-file

  gcc -m32 -dynamiclib ldflags -o dylib-file -dylib object-file

Warning: Super C is unsafe by nature and currently only supports Mac OS X with Developer Tools. Since MzScheme requires 32-bit on OS X, it can’t be used with some obvious libraries.