Reworking the keyword parser, also fixed some dynamic linking issues
This commit is contained in:
@@ -238,9 +238,11 @@ static std::u32string console_read() {
|
||||
|
||||
static void call_init_engine_wrapper(const std::filesystem::path &luprexroot, EngineWrapper *w) {
|
||||
using InitFn = void (*)(EngineWrapper *);
|
||||
InitFn initfn = (InitFn)dlsym(nullptr, "init_engine_wrapper");
|
||||
void *exe_handle = dlopen(nullptr, RTLD_NOW | RTLD_LOCAL);
|
||||
InitFn initfn = (InitFn)dlsym(exe_handle, "init_engine_wrapper");
|
||||
if (initfn == nullptr) {
|
||||
std::string path = luprexroot / "build/linux/luprexlib.so";
|
||||
fprintf(stderr, "loading luprexlib.so...\n");
|
||||
std::string path = luprexroot / "build/Linux/luprexlib.so";
|
||||
void *dll_handle = dlopen(path.c_str(), RTLD_NOW | RTLD_LOCAL);
|
||||
assert(dll_handle != nullptr);
|
||||
initfn = (InitFn)dlsym(dll_handle, "init_engine_wrapper");
|
||||
|
||||
Reference in New Issue
Block a user