Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libsyclinterface/helper/include/dpctl_dynamic_lib_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

#endif // __linux__

#include "dpctl_error_handlers.h"
#include <cstdint>

namespace dpctl
Expand Down Expand Up @@ -76,12 +77,18 @@ class DynamicLibHelper final
char *error = dlerror();

if (nullptr != error) {
error_handler("Could not retrieve symbol " + std::string(symName) +
". Error encountered: " + std::string(error),
__FILE__, __func__, __LINE__);
return nullptr;
}
#elif defined(_WIN32) || defined(_WIN64)
void *sym = (void *)GetProcAddress((HMODULE)_handle, symName);

if (nullptr == sym) {
error_handler("Could not retrieve symbol " + std::string(symName) +
".",
__FILE__, __func__, __LINE__);
return nullptr;
}
#endif
Expand Down