Previous: User-defined Main Programs, Up: Stand-Alone Executables [Contents][Index]
There are three ready-made runtime systems provided with the
distributions, sprt.exe, sprti.exe, and (only on Windows)
sprtw.exe. These have been created using spld
:
$ spld --main=restore '$SP_APP_DIR/main.sav' -o sprt.exe $ spld --main=restore '$SP_APP_DIR/main.sav' -i -o sprti.exe $ spld --main=restore '$SP_APP_DIR/main.sav' --window -o sprtw.exe
These are provided for users who do not have a C-compiler available. Each program launches a runtime system by restoring the saved state main.sav (located in the same folder as the program).
The saved state is created by save_program/[1,2]
. If it was
created by save_program/2
, then the given startup goal is run. Then,
user:runtime_entry(start)
is run. The program exits with 0 upon
normal temination and with 1 on failure or exception.
The program sprti.exe
assumes that the standard streams are
connected to a terminal, even if they do not seem to be (useful under
Emacs, for example). On Windows only, sprtw.exe
is a windowed
executable, corresponding to spwin.exe
.