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
+17
-32
No files matched your search
@@ -54,6 +54,12 @@ else()
|
|||||||
add_compile_options(-fPIC)
|
add_compile_options(-fPIC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (MINGW OR WIN32)
|
||||||
|
list(FILTER SOURCES EXCLUDE REGEX "LoadLibraryUnix\\.cpp$")
|
||||||
|
else()
|
||||||
|
list(FILTER SOURCES EXCLUDE REGEX "LoadLibraryWin\\.cpp$")
|
||||||
|
endif()
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Build shared library
|
# Build shared library
|
||||||
# ============================================================
|
# ============================================================
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#if defined(_WIN32)
|
#include <string>
|
||||||
# include <Mods/LoadLibraryWin.hpp>
|
namespace vl::mod {
|
||||||
#else
|
|
||||||
# include <Mods/LoadLibraryUnix.hpp>
|
void* LoadLibrary(const std::string& path, bool isGlobal);
|
||||||
#endif
|
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)
|
#if defined(unix)
|
||||||
|
|
||||||
#include <Mods/LoadLibraryUnix.hpp>
|
#include <Mods/LoadLibrary.hpp>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
namespace vl::mod {
|
namespace vl::mod {
|
||||||
void* LoadLibrary(const std::string& path, bool isGlobal)
|
void* LoadLibrary(const std::string& path, bool isGlobal)
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
#if defined(_WIN32)
|
#include <Mods/LoadLibrary.hpp>
|
||||||
|
|
||||||
#include <Mods/LoadLibraryWin.hpp>
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
@@ -112,5 +110,4 @@ namespace vl::mod {
|
|||||||
{
|
{
|
||||||
return (void*)(uintptr_t) GetProcAddress(static_cast<HMODULE>(handle), name.c_str());
|
return (void*)(uintptr_t) GetProcAddress(static_cast<HMODULE>(handle), name.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
Reference in new issue
Block a user