Closed
Description
Summary
Many Linux distros do not have libdl.so, rather they only have libdl.so.2. This causes a DllNotFoundException
when using its native functions.
This would only occur when using .NET Framework / .NET Standard, as .NET Core / .NET 5+ just use System.Runtime.InteropServices.NativeLibrary
instead of P/Invoking libdl directly.
According to the loader readme, the code was taken from NativeLibraryLoader, which seems to have this issue fixed already, so it's probably as simple as porting over that fix.
Steps to reproduce
- Platform: Linux (Ubuntu 22.04 was used for this case)
- Framework Version: .NET Framework / .NET Standard (.NET Core / .NET 5+ is not affected)
- Do anything which loads in a native library (e.g. Sdl.GetApi).