node-ctypes - v2.10.0
    Preparing search index...

    Function find_library

    • Resolve a library name to a platform-specific filename or path.

      Python equivalent: ctypes.util.find_library(name)

      • On Windows, bare names get .dll appended, and a few universal aliases are provided (e.g. "c" → "msvcrt.dll").
      • On Linux, the ldconfig cache and common library directories are searched for the best-matching libNAME.so.VERSION.
      • On macOS, the DYLD_* paths, the dyld fallback directories, Homebrew and the framework directories are searched, including the dyld shared cache (system libraries and frameworks are not on disk since macOS 11).

      Returns null if the input is invalid. Returns a best-effort fallback (bare soname) if nothing is found, so the loader can still try its own search path.

      Parameters

      • name: string

      Returns string

      import { find_library, CDLL } from 'node-ctypes';
      const libc = new CDLL(find_library('c'));