16 std::unique_lock<std::mutex> lock(
_mutex);
23 _handle = dlopen(path.c_str(), RTLD_NOW | RTLD_GLOBAL);
26 const char* err = dlerror();
27 throw RuntimeError(
"Could not load library: " + (err ? std::string(err) : path));
34 std::unique_lock<std::mutex> lock(
_mutex);
50 std::unique_lock<std::mutex> lock(
_mutex);
52 void* result =
nullptr;
55 result = dlsym(
_handle, name.c_str());
67 #if BT_OS == BT_OS_CYGWIN 76 #if BT_OS == BT_OS_MAC_OS_X 77 #if defined(_DEBUG) && !defined(CL_NO_SHARED_LIBRARY_DEBUG_SUFFIX) 82 #elif BT_OS == BT_OS_HPUX 83 #if defined(_DEBUG) && !defined(CL_NO_SHARED_LIBRARY_DEBUG_SUFFIX) 88 #elif BT_OS == BT_OS_CYGWIN 89 #if defined(_DEBUG) && !defined(CL_NO_SHARED_LIBRARY_DEBUG_SUFFIX) 95 #if defined(_DEBUG) && !defined(CL_NO_SHARED_LIBRARY_DEBUG_SUFFIX) static std::string prefix()
static std::string suffix()
const std::string & getPath() const
Simple class for manipulating paths on Linux/Windows/Mac OS.
void load(const std::string &path, int flags=0)
bool isLoaded() const
Unloads a shared library.
void * findSymbol(const std::string &name)