file.pl
:- ensure_loaded(library(basics)).
:- ensure_loaded(file1).
:- ensure_loaded(file2).
runtime_entry(start) :- go.
file1.pl
< some foreign/[2,3] facts >
< some foreign_file/2 facts >
:- load_foreign_files([system(foreign)],[]).
% qpc file (A)
Given the above files, the command (A) will have these results:
file.pl into !sq'file.qof'
library-directory/basics.qof file1.qof file2.qof (B)
file.qof on the three QOF files in (B) and
records the dependency of file1.qof on foreign.o in
file1.qof, so that when qpc then calls (C) an executable
file is built for the entire program.
% qld -d file.qof (C)
If for some reason you didn't want to use the -d option to
qld, you could achieve the same effect as qpc file
by the following sequence of commands:
% qpc -c file file1 file2
% qld file.qof library-directory/basics.qof file1.qof file2.qof foreign.o
Alternatively, these commands would work:
% qpc -c file file1 file2
% qld file.qof "library(basics)" file1.qof file2.qof foreign.o
Note that moving a QOF file from one directory to another may render
its dependencies incorrect, so that the -d option
cannot be used when loading that file. If relative filenames are
used, a set of mutually dependent files can safely be moved
around the directory hierarchy, or to another machine, provided that
they retain the same positions relative to one another. In
particular, a set of files that are all in the same directory can
safely be moved. Using file search path specifications (see
sap-srs-fsp and ref-lod) enables you to
create alterable paths.