chickadee » compile-file » compile-file

compile-file FILENAME #!key options output-file loadprocedure

Compiles the Scheme source file FILENAME into a dynamically loadable library by invoking the csc compiler driver. If the library can be successfully created and load is not given or true, the file is loaded into the current Scheme process. options may be a list of strings which are passed as additional command line options to csc. If output-file is not given, then the compiled file is stored in a temporary location and will be deleted when the process exits successfully. When compilation and loading succeeds, the name of the compiled file is returned, otherwise #f is returned.


  • loading the same compiled file multiple times is only supported on Linux in the moment and should be considered unreliable. For this reason, a new temporary file is created for every invocation of compile-file, unless an explicit output file name is given.
  • this procedure is compatible to the scheme-compile-file command in emacs' scheme-mode.