load_foreign_executable/1 hookableload_foreign_executable(+Executable)
Load the foreign executable (shared object file) Executable
into Prolog.
Relies on the hook predicates foreign_file/2 and
foreign/[2,3].
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.
Uses the foreign/3 and 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
the 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.
Looks for foreign/3 and 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 foreign/[2,3]
foreign_file/2, foreign/[2,3],
load_foreign_files/2
fli-p2f