Following is a summary of the steps that enable you to call foreign code from a Prolog predicate:
In the Prolog code:
foreign_file/2
(see fli-p2f-lnk).
foreign/3
(see fli-p2f-api).
load_foreign_executable/1
or load_foreign_files/2
(see fli-p2f-uso).