1 #ifndef LSST_BASE_LIBRARY_H 2 #define LSST_BASE_LIBRARY_H 8 #ifndef RTLD_DEEPBIND // Non-POSIX flag, so it may not exist 9 #define RTLD_DEEPBIND 0 // Will be ignored 21 std::
runtime_error(
"Unable to find function " + func +
" from dynamically loaded library " + lib) {};
62 (
void*&)sym = dlsym(lib, symName.
c_str());
T * loadSymbol(std::string const &libName, std::string const &symName)
Load a symbol from a dynamic library.
std::string getLibraryFilename(std::string const &name)
Get filename for library.
std::string libraryExtension()
Return filename extension for libraries.
A base class for image defects.
LibraryException(std::string const &name)
LibraryException(std::string const &lib, std::string const &func)
bool canLoadLibrary(std::string const &libName)
Return whether we can load a library.