I've uploaded the class that, for many years, I've used as a wrapper for .DLL and .so files to
https://github.com/MarkMLl/dynamod This allows a library to be declared as a class, that is opened when the class is instantiated; with care libraries may be closed and reopened if a later version becomes available without disrupting the caller's operation.
See
https://github.com/MarkMLl/dsocat for an example.
I've also, in the same repository, put the defToSDUnits program that I've used for several years to convert a .inc file (typically generated by h2pas) into a form in which it can be used for either static or dynamic linkage: static linkage simplifies debugging, dynamic linkage allows graceful failure if a library is missing at runtime (as well as plugin reloading etc.). This builds on what was originally a MIDI filter written in the early 2010s, I'm fairly confident in its underpinnings.
An example is at
https://github.com/MarkMLl/dynamod/tree/main/demo but this is also what I used to generate the files at
https://github.com/MarkMLl/asound (these took a lot of fiddling to get function documentation into the .inc file, but after that conversion was automatic).
MarkMLl