Skip to content

Commit

Permalink
Search for binaries with lib prefix outside of Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Saalvage committed Jan 20, 2025
1 parent 69df748 commit ef44579
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion AssimpNet/Unmanaged/UnmanagedLibraryImplementation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ private string GetUnmanagedName(Type funcType)
return funcType.GetCustomAttribute<UnmanagedFunctionNameAttribute>(false)?.UnmanagedFunctionName;
}

private IntPtr NativeLoadLibrary(string path) => NativeLibrary.Load(path, Assembly.GetExecutingAssembly(), null);
private IntPtr NativeLoadLibrary(string path) => NativeLibrary.Load(
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? path : ("lib" + path), Assembly.GetExecutingAssembly(), null);
private void NativeFreeLibrary(IntPtr handle) => NativeLibrary.Free(handle);

private IntPtr NativeGetProcAddress(IntPtr handle, string functionName) =>
Expand Down

0 comments on commit ef44579

Please sign in to comment.