Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handling for libdl.so.2 #19

Merged
merged 1 commit into from
Dec 20, 2022
Merged

Add handling for libdl.so.2 #19

merged 1 commit into from
Dec 20, 2022

Conversation

trolleyman
Copy link
Contributor

Closes #2 & #18

@trolleyman
Copy link
Contributor Author

@mellinoe just in case this hasn't been seen

@Trojaner
Copy link

Trojaner commented Nov 30, 2022

An alternative way would be using NativeLibrary.SetDllImportResolver, see https://stackoverflow.com/a/68677109/2475431
However this needs to check if there is already a custom DllImportResolver, in which case it needs to be called first. Also only works with .NET Core 3+

@trolleyman
Copy link
Contributor Author

trolleyman commented Dec 15, 2022

@Trojaner I can't find any way to get the existing DllImportResolver, that's why I didn't use that method as I didn't want to mess up any existing DllImportResolver. Searching for GetDllImportResolver only returns one result, and that is a suggestion about maybe adding that function in future. The docs of SetDllImportResolver mention that "The callers of this method should register the resolver for their own assemblies only".

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libdl is named inconsistently accross Linux distros
3 participants