92 T
get(
const std::string& procname)
96#if defined(ARK_OS_WINDOWS)
97 if (NULL == (funcptr =
reinterpret_cast<T
>(GetProcAddress(m_instance, procname.c_str()))))
99 throw std::system_error(
100 std::error_code(::GetLastError(), std::system_category()), std::string(
"PluginError: Couldn't find ") + procname);
102#elif defined(ARK_OS_LINUX)
103 if (NULL == (funcptr =
reinterpret_cast<T
>(dlsym(m_instance, procname.c_str()))))
105 throw std::system_error(
106 std::error_code(errno, std::system_category()), fmt::format(
"SharedLibraryError: Couldn't find {}, {}", procname, dlerror()));