Module ffi.loadlib

Helper for loading native libraries.

Example:

local sdl = ffi.loadlib("SDL2-2.0", 0, "SDL2-2.0", nil, "SDL2", nil)

Will search lib_search_path for the following candidates on Linux: libSDL2-2.0.so.0, libSDL2-2.0.so, libSDL2.so.

The first one found will be loaded with ffi.load, falling back to the first candidate otherwise (which should be a versioned library to ensure ABI compatibility).

Functions

ffi.loadlib (...) Load a native library.


Functions

ffi.loadlib (...)
Load a native library.

Parameters:

  • ... list of candidates (library name, version)
generated by LDoc 1.5.0 Last updated 2024-12-19 07:44:17