4 #include <boost/filesystem.hpp> 16 static bool first =
true;
34 raise(
"failed to initialize dladvise: ", lt_dlerror());
41 if (lt_dladvise_destroy(&
advise_))
42 raise(
"failed to destroy dladvise: ", lt_dlerror());
48 if (global ? lt_dladvise_global(&
advise_) : lt_dladvise_local(&
advise_))
49 raise(
"failed to set dladvise to ", global ?
"global" :
"local",
58 raise(
"failed to set dladvise to ext: ", lt_dlerror());
84 return lt_dlopenadvise(s.c_str(),
advise_);
90 auto res = lt_dlhandle{
nullptr};
104 raise(
"failed to dlopen module ", s,
": ", lt_dlerror());
133 int errors = lt_dlclose(
handle);
136 raise(
"failed to dlclose module: ", lt_dlerror());
xlt_handle open(const std::string &s)
lt_dlhandle dlopen_(const file_library::path &s) const
Does not use the search path. Can return 0.
lt_dlhandle handle
The handle.
const file_library & path() const noexcept
xlt_handle xlt_openext(const std::string &s, bool global)
Wrapper around lt_dlopenext.
xlt_handle(lt_dlhandle h=nullptr)
void attach(lt_dlhandle h)
Detach so that destruction does not close.
boost::filesystem::path path
Explicit path representation.
const path_list_type & search_path_get() const
void detach()
Detach so that destruction does not close.
xlt_advise & global(bool global)
void close()
Close the handle.