usin somethink like ldopen Mybe the Library class from https://github.com/Krozark/cpp-utils can be used for this