Load the foreign executable (shared object file) Executable
Relies on the hook predicates
load_foreign_executable/1 takes a shared object file and loads it
into Prolog. If the file contains dependencies on other
shared objects/libraries, then these are loaded automatically.
For details on how these are loaded see fli-p2f-lfe.
The extension can be omitted from the filename given in the Executable argument.
foreign_file/2 facts defined by the
user to make the connection between a Prolog procedure and the foreign
function. When loading the shared object file, it looks for a
foreign_file/2 fact for that file and for each symbol in
foreign_file/2 fact it looks for a
foreign/3 fact that
gives the name of the Prolog procedure associated with the foreign
symbol and the argument specification.
foreign_file/2 facts defined in
its source module only.
Before calling this predicate, generate the shared object file from object files (and libraries); see fli-p2f-uso.
Errors in the specification of
foreign/3 will all be reported when
load_foreign_executable/1 is called.
See example under