Fixed Windows/MSVC compilation.

This commit is contained in:
2024-06-26 10:05:32 +02:00
parent b10f250945
commit b1fa99428e
8 changed files with 41 additions and 5 deletions

View File

@@ -46,6 +46,9 @@ LibraryHandle openSharedLibrary(std::string_view libraryFile) noexcept
const fs::path libraryPath = fs::absolute(libraryFile);
return {.data = dlopen(libraryPath.c_str(), RTLD_NOW)};
#elif MIJIN_TARGET_OS == MIJIN_OS_WINDOWS
// TODO
(void) libraryFile;
return {};
#endif
}
@@ -54,6 +57,9 @@ void* loadSymbolFromLibrary(const LibraryHandle library, const char* symbolName)
#if MIJIN_TARGET_OS == MIJIN_OS_LINUX
return dlsym(library.data, symbolName);
#elif MIJIN_TARGET_OS == MIJIN_OS_WINDOWS
(void) library;
(void) symbolName;
return nullptr;
#endif
}
@@ -62,6 +68,7 @@ void setCurrentThreadName(const char* threadName) noexcept
#if MIJIN_TARGET_OS == MIJIN_OS_LINUX
pthread_setname_np(pthread_self(), threadName);
#elif MIJIN_TARGET_OS == MIJIN_OS_WINDOWS
(void) threadName;
#endif
}