Putting libraries on swipl's equivalent of LD_LIBRARY_PATH
On my machine,
foreign means look in these:
?- file_search_path(foreign,X). X = swi('lib/x86_64-linux') ; X = swi(lib) ; false.
swi means look in these:
?- file_search_path(swi,X). X = '/usr/local/logic/swipl/lib/swipl' ; false.
Once you have compiled an .so file, make it discoverable by swipl using
After that, one can load the Prolog file of the module as usual. By consulting directly or be using use_module/2
Using the environment variable
LD_LIBRARY_PATH does nothing.