Availability:built-in
open_shared_object(+File,
-Handle, +Options)As open_shared_object/2,
but allows for additional flags to be passed. Defined options are below.
These options map to RTLD_NOW
,
RTLD_LAZY
, RTLD_GLOBAL
, RTLD_NODELETE
,
RTLD_NOLOAD
and RTLD_DEEPBIND
on systems where
this predicate is implemented using dlopen() and these flags are
supported. If the flag is not supported on the target OS, the
corresponding option is silently ignored.
- resolve(Atom)
- When to resolve symbols. Values are
lazy
(default) or
now
.
- visibility(Atom)
- Visibility of the new symbols. Values are are
local
(default) or global
, making the new symbols available to
all subsequently loaded shared objects.
- now(Bool)
now(true)
is the same as resolve(now)
.
Provided for backward compatibility.
- global(Bool)
global(true)
is the same as visibility(global)
.
Provided for backward compatibility.
- delete(Bool)
- If
false
, include RTLD_NODELETE
.
- load(Bool)
- if
false
, include RTLD_NOLOAD
. This returns a
handle to the object if it is already loaded and NULL
otherwise. It causes this predicate to fail silently if the
object is not loaded.
- deepbind(Bool)
- if
true
, include RTLD_DEEPBIND
.
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.