3 #include "module_private.h"
4 #include "systemerror.h"
10 Module::Module(const string &name)
12 ModuleHandle handle = dlopen(name.c_str(), RTLD_NOW);
14 throw system_error("dlopen", dlerror());
17 priv->handle = handle;
22 dlclose(priv->handle);
26 void *Module::get_symbol(const string &name) const
29 void *result = dlsym(priv->handle, name.c_str());
32 const char *err = dlerror();
34 throw system_error("dlsym", err);