To build an executable you need a working ECL image with the
compiler. The function to build customized images is
c::build-program. The description of this function is as
follows. Care should be taken that
image-name differs from any
This function builds a lisp image up from the core lisp library, plus all components listed in
lisp-files. Each component is either:
A symbol: Names a statically linked library built from lisp code.
A string: Denotes an object file built from lisp code.
ld-flagsis a list of strings with additional parameters to be passed to the linker. You can include here your favorite C/C++ libraries.
epilogue-codeare used to customize the initialization process of the lisp image. In order to build the executable,
c:build-programfirst writes down a piece of C code which initializes the lisp environment. You can customize the initialization process by suppling code to be executed before (
prologue-code) or after (
epilogue-code) setting up the lisp environment. Typically
prologue-codedefaults to an empty string, while
epilogue-codeinvokes the classical lisp
top-level. Additionally, as a convenience,
epilogue-codecan be either a string with C code or also a list with a lisp form, which will be interpreted at run time.