-
Notifications
You must be signed in to change notification settings - Fork 5
Description
The SDL2-CS library uses PInvoke to load SDL2 libraries. SDL2 is distributed in Windows as SDL2.dll, Mac as libSDL2.dylib, and Linux under varying names such as libSDL2.so or libSDL2-2.0-0.so.
This works properly under the following scenarios:
- Windows with .NET Framework
- Mac with Mono
- Linux with Mono
Mono uses a dllmap algorithm to allow developers to redirect native library resolution in case of libraries not being found with standard names.
.NET Core doesn't have dllmap abilities and instead will only search for the name you provide and slight variations such as appending lib to the front.
While there is a new NativeLibrary class that allows developers to customize the way in which native libraries are resolved, this is only supported in .NET Core 3.0 and above. The library has yet to be added to any version of the .NET Standard, making it challenging to use in a library such as SharpDL that strives to be as broadly accessible as possible.