Hi,
I had to perform specific operations on memory for a .NET project. So I built a custom shared library that contains the methods I need (they don’t exists on .NET).
the name of my lib is libcomeim.so
I’m now trying to add libcomeim.so on my .NET project. But I don’t know how to do that with the torizon extension for vs code.
I already tried to add this on the path : obj\Debug\net5.0linux-arm\libcomeim.so
But when I run this code:
using System.Runtime.InteropServices;
namespace teestt
{
class Program
{
[DllImport ("libcomeim.so")]
private static extern void test();
static void Main(string[] args)
{
test();
}
}
}
The following exception appears:
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'libcomeim.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibcomeim.so: cannot open shared object file: No such file or directory
at teestt.Program.test()
at teestt.Program.Main(String[] args) in C:\Users\rfonc\Desktop\docs_stage\code\teestt\Program.cs:line 16
Have you an idea about how I can add mpy shared library to my project ?
Best regards,
rfonck