Module Tolk.C
Shared libraries of the system.
A compiler finds its vendor's library when it is made, and making it fails without one.
val multiarch : stringmultiarch is the name Linux distributions give the host's machine in library directories, as in "x86_64-linux-gnu".
val findlib :
?extra_paths:string list ->
string ->
string list ->
string optionfindlib ~extra_paths name paths is the file of the library name, the first of:
- the file that the variable
NAME_PATHnames, whereNAMEisnamein uppercase with its dashes replaced by underscores, if it is a file; - for each of
pathsin order: the path itself if it is absolute, when it is a file. Otherwise the library of that name in the first of these directories that has it: the directoryNAME_PATHnames, then on Windows those ofPATH; elsewhere those ofLD_LIBRARY_PATH,/usr/lib64,/usr/liband/usr/local/lib, then on macOS/opt/homebrew/liband the framework of that name, system or private, and on Linux/usr/lib/wsl/lib,/lib,/lib64and/lib/multiarch; thenextra_paths(default[]).
The library p in a directory is, on macOS, the first of libp.dylib, p.dylib and p (a framework's binary is a symbolic link); elsewhere, a file libp.so or libp.so.V, with V made of digits and dots, that starts as an ELF file does, the first in the order of their names. It is None if there is none.
val identity : string option -> stringidentity file names the library file, as findlib finds it: its path, size and time of last modification, or its path alone if it cannot be read, as a library of macOS's shared cache, and "none" for None. A library that changes changes its identity, so that what was compiled with it can be told from what another compiles.