|Did you know ...||Search Documentation:|
|Title for pldoc(object(section(4,'22.214.171.124',swi('/doc/Manual/compilation.html'))))|
This mechanism loads a series of Prolog source files and then creates a saved state as qsave_program/2 does. The command syntax is:
% swipl [option ...] [-o output] -c file.pl ...
For example, to create a stand-alone executable that starts by
executing main/0 and for which the source is loaded through
load.pl, use the command
% swipl --goal=main --stand_alone=true -o myprog -c load.pl
This performs exactly the same as executing
% swipl <banner> ?- [load]. ?- qsave_program(myprog, [ goal(main), stand_alone(true) ]). ?- halt.