LibraryUnixImpl( str_cref alias, str_cref path ) : m_handle( NULL ), m_alias( alias ), m_path( path ) { if( !( m_handle = dlopen( path.c_str(), RTLD_LAZY | RTLD_GLOBAL ) ) ) { std::ostringstream oss; oss << "Failed to open library " << alias << " at " << path << "\n\t" << dlerror(); throw std::invalid_argument( oss.str() ); } }