fix: Linux build issues
This commit is contained in:
parent
47e7e80afe
commit
cf320266df
@ -49,7 +49,9 @@ namespace hex {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (handle != 0) {
|
if (handle != 0) {
|
||||||
dlclose(reinterpret_cast<void*>(handle));
|
if (dlclose(reinterpret_cast<void*>(handle)) != 0) {
|
||||||
|
log::error("Error when unloading library '{}': {}!", path.filename().string(), dlerror());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,11 @@ namespace hex::script::loader {
|
|||||||
throw std::runtime_error(hex::format("Failed to initialize command line {:X}", result));
|
throw std::runtime_error(hex::format("Failed to initialize command line {:X}", result));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (OS_WINDOWS)
|
||||||
hostfxr_set_runtime_property_value(ctx, STRING("PINVOKE_OVERRIDE"), utf8ToUtf16(hex::format("{}", (void*)pInvokeOverride)).c_str());
|
hostfxr_set_runtime_property_value(ctx, STRING("PINVOKE_OVERRIDE"), utf8ToUtf16(hex::format("{}", (void*)pInvokeOverride)).c_str());
|
||||||
|
#else
|
||||||
|
hostfxr_set_runtime_property_value(ctx, STRING("PINVOKE_OVERRIDE"), hex::format("{}", (void*)pInvokeOverride).c_str());
|
||||||
|
#endif
|
||||||
|
|
||||||
result = hostfxr_get_runtime_delegate(
|
result = hostfxr_get_runtime_delegate(
|
||||||
ctx,
|
ctx,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user