The interface defined in this section allows the user to load shared
libraries (.so
files on most Unix systems, .dll
files on Windows). This interface is portable to Windows as well as to
Unix machines providing dlopen(2) (Solaris, Linux,
FreeBSD, Irix and many more) or shl_open(2) (HP/UX). It
is advised to use the predicates from section
9.4 in your application.
open_shared_object(File, [], Handle)
. See also
load_foreign_library/[1,2].
On errors, an exception shared_object(Action, Message)
is raised. Message is the return value from dlerror().
now
implies the
symbols are resolved immediately rather than lazy (default). global
implies symbols of the loaded object are visible while loading other
shared objects (by default they are local). Note that these flags may
not be supported by your operating system. Check the documentation of
dlopen() or equivalent on your operating system. Unsupported flags are
silently ignored.