27 *(
void **) (fn_ptr) = dlsym(handle, symbol);
28 char* error = dlerror();
31 ss <<
"Unable to find " << symbol <<
"\ndlerror: " << error;
49 *handle = dlopen(library, flags);
50 if (*handle == NULL) {
52 ss <<
"Unable to load " << library <<
"\ndlerror: " << dlerror();
Status DynamicOpen(const char *library, void **handle)
Status DynamicLookup(void *handle, const char *symbol, void **fn_ptr, bool quiet)
static Status Expected(const std::string &error_msg)
Create a status instance that represents an expected error and will not be logged.
void DynamicClose(void *handle)
Closes the handle.