Please check recommendation from Redhat. I think this advice is applicable across different distros.
When using dotnet on Linux, should DllImport reference a Windows DLL or Linux libXXX.so
Have setup dotnet on Linux / Centos8.
Have compiled simple .NET Core C# HelloWorld with Visual Studio on Windows, transferred .NET Core C# DLL to Linux / Centos8, and can run, see "Hello, world" output.
Now need to have .NET Core C# program call functions in Linux / Centos8 libXXX.so file, which of course is a Linux equivalent of DLL.
Get System.DllNotFoundException: Unable to load shared library.
The referenced libXXX.so file is in the same directory as the .NET Core C# DLL, so there should be no problem finding the libXXX.so.
Question then, is can .NET Core C# DLLs call functions in Linux libXXX.so libraries?
Or must .NET Core C# DLLs call functions in Windows DLLs?
Thanks.