Did you know ... Search Documentation:
qsave.pl -- Save current program as a state or executable
PublicShow source

This library provides qsave_program/1 and qsave_program/2, which are also used by the commandline sequence below.

swipl -o exe -c file.pl ...
Source qsave_program(+File) is det
Source qsave_program(+File, :Options) is det
Make a saved state in file `File'.
 qsave:arch_shlib(+Architecture, +FileSpec, -File) is det[multifile]
This is a user defined hook called by qsave_program/2. It is used to find a shared library for the specified Architecture, named by FileSpec. FileSpec is of the form foreign(Name), a specification usable by absolute_file_name/2. The predicate should unify File with the absolute path for the shared library that corresponds to the specified Architecture.

If this predicate fails to find a file for the specified architecture an existence_error is thrown.