libloading 0.2.0

dynamic library loading primitive.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

libloading

A system dynamic library loading primitive, fully inspired by rust_libloading. However, this library doesn't prevent dangling-Symbols that may occur after a Library is unloaded.

Using this library allows loading dynamic libraries as well as use functions and static variables these libraries contain.

Example

alias ceilFunc = double function(double);

// Load a shared library.
auto lib = loadLibrary(DYNAMIC_LIBRARY_NAME);

// Get a function pointer by symbol name.
auto ceil = lib.getSymbol!(ceilFunc)("ceil");
assert(ceil(0.45) == 1);

lib.unload();
Authors:
  • Hiroki Noda
Dependencies:
none
Versions:
0.2.0 2022-Sep-13
0.1.0 2020-Feb-07
~master 2022-Sep-13
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 18 downloads total

Score:
0.5
Short URL:
libloading.dub.pm