fixing mingw errors
VoidLoader/VoidLoaderCore/pipeline/head There was a failure building this commit
VoidLoader/VoidLoaderCore/pipeline/head There was a failure building this commit
Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
6 files changed
+16
-31
No files matched your search
@@ -54,6 +54,12 @@ else()
|
||||
add_compile_options(-fPIC)
|
||||
endif()
|
||||
|
||||
if (MINGW OR WIN32)
|
||||
list(FILTER SOURCES EXCLUDE REGEX "LoadLibraryUnix\\.cpp$")
|
||||
else()
|
||||
list(FILTER SOURCES EXCLUDE REGEX "LoadLibraryWin\\.cpp$")
|
||||
endif()
|
||||
|
||||
# ============================================================
|
||||
# Build shared library
|
||||
# ============================================================
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#pragma once
|
||||
#if defined(_WIN32)
|
||||
# include <Mods/LoadLibraryWin.hpp>
|
||||
#else
|
||||
# include <Mods/LoadLibraryUnix.hpp>
|
||||
#endif
|
||||
#include <string>
|
||||
namespace vl::mod {
|
||||
|
||||
void* LoadLibrary(const std::string& path, bool isGlobal);
|
||||
bool CloseLibrary(void* handle);
|
||||
void* LoadSymbol(void* handle, const std::string& name);
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#pragma once
|
||||
#if defined(unix)
|
||||
#include <string>
|
||||
namespace vl::mod {
|
||||
|
||||
void* LoadLibrary(const std::string& path, bool isGlobal);
|
||||
bool CloseLibrary(void* handle);
|
||||
void* LoadSymbol(void* handle, const std::string& name);
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -1,10 +0,0 @@
|
||||
#pragma once
|
||||
#if defined(_WIN32)
|
||||
|
||||
#include <string>
|
||||
namespace vl::mod {
|
||||
void* LoadLibrary(const std::string& path, bool isGlobal);
|
||||
bool CloseLibrary(void* handle);
|
||||
void* LoadSymbol(void* handle, const std::string& name);
|
||||
}
|
||||
#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
#if defined(unix)
|
||||
|
||||
#include <Mods/LoadLibraryUnix.hpp>
|
||||
#include <Mods/LoadLibrary.hpp>
|
||||
#include <dlfcn.h>
|
||||
namespace vl::mod {
|
||||
void* LoadLibrary(const std::string& path, bool isGlobal)
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#if defined(_WIN32)
|
||||
|
||||
#include <Mods/LoadLibraryWin.hpp>
|
||||
#include <Mods/LoadLibrary.hpp>
|
||||
#include <assert.h>
|
||||
#include <cstdint>
|
||||
#include <windows.h>
|
||||
@@ -113,4 +111,3 @@ namespace vl::mod {
|
||||
return (void*)(uintptr_t) GetProcAddress(static_cast<HMODULE>(handle), name.c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user