dl #

Constants #

const (
	version = 1
	dl_ext  = get_shared_library_extension()
)
const (
	rtld_now  = C.RTLD_NOW
	rtld_lazy = C.RTLD_LAZY
)

fn close #

fn close(handle voidptr) bool

close frees a given shared object.

fn dlerror #

fn dlerror() string

dlerror provides a text error diagnostic message for functions in dl it returns a human-readable string, describing the most recent error that occurred from a call to one of the dl functions, since the last call to dlerror()

fn get_libname #

fn get_libname(libname string) string

get_libname returns a library name with the operating system specific extension for shared libraries.

fn get_shared_library_extension #

fn get_shared_library_extension() string

get_shared_library_extension returns the platform dependent shared library extension i.e. .dll on windows, .so on most unixes, .dylib on macos.

fn open #

fn open(filename string, flags int) voidptr

fn open_opt #

fn open_opt(filename string, flags int) ?voidptr

open_opt - loads the dynamic shared object.
Unlike open, open_opt return an option.

fn sym #

fn sym(handle voidptr, symbol string) voidptr

sym returns an address of a symbol in a given shared object.

fn sym_opt #

fn sym_opt(shared_object_handle voidptr, symbol string) ?voidptr

sym_opt returns the address of a symbol in a given shared object, if found.
Unlike sym, sym_opt returns an option.