8 #ifndef __UNIXSHAREDLIBRARY_H__
9 #define __UNIXSHAREDLIBRARY_H__
12 #include "libhmsbeagle/config.h"
15 #include "libhmsbeagle/plugin/SharedLibrary.h"
32 void* findSymbol(
const char* name);
38 UnixSharedLibrary::UnixSharedLibrary(
const char* name)
41 std::string libname =
"lib";
48 m_handle = dlopen(libname.c_str(),RTLD_NOW|RTLD_GLOBAL);
51 const char* s = dlerror();
55 UnixSharedLibrary::~UnixSharedLibrary() { dlclose(m_handle); }
57 void* UnixSharedLibrary::findSymbol(
const char* name)
59 void* sym = dlsym(m_handle,name);
61 throw SharedLibraryException(
"Symbol Not Found");
69 #endif // HAVE_LIBLTDL
71 #endif // __UNIXSHAREDLIBRARY_H__