Next: , Previous: , Up: using   [Index]


2.5 Compiling Scheme programs

Scheme programs can be executed by Vicare from both source and binary formats.

On GNU+Linux platforms it is possible to execute programs directly without explicitly invoking the executable, Launching programs directly on GNU+Linux.

To compile a source program into binary form, we can use the specific command line option --compile-program or the general command line option --compile (which can be abbreviated as -c).

To compile script.sps into script.fasl we can do:

vicare --compile-program script.sps --output script.fasl

the option --compile recognises input files with extension .sps as programs, so we can also do:

vicare --compile script.sps --output script.fasl

or with short options:

vicare -c script.sps -o script.fasl

There is no need to use the extension .fasl for binary programs, so it is recommended to just do:

vicare -o script -c script.sps

or, even shorter:

vicare -c script.sps

which will automatically build the output file name by stripping .sps from the input file name; the output file name is created in the same directory of the input file name.

NOTE If the option --library-locator is not used: using --compile-program or --compile will automatically select the compile–time library locator.


Next: , Previous: , Up: using   [Index]