Reputation: 870
I have a .so files which I was using it in java code which compiled to be used on an Android machines, now I forced to use some of the functionalists that are defined in the .so files, in a .NET c# application. How can I reference or consume .so files in the c# program?
Upvotes: 1
Views: 349
Reputation: 52956
If you want to use this on a PC, no, you can't use the file directly. You need to get the source and recompile to a DLL which you can use from .NET via Platform Invoke (IIRC the name). What you have is most probably ARM code, and you will need x86 for a PC.
Monodroid might work an Android device, since it most likely just compiles to Android code. I've never used it though, so don't quote me on this.
Upvotes: 2
Reputation: 474
I don't think this is possible.
.so is a shared object, which is machinecode (Android Native Interface) for the phone / emulator. I don't know C# very good, but I don't think there is any interface with which you could access the members of the .so.
Beside of this is .so the shared objects format for linux, and .NET runs mostly on windows.
Also, the .so is most likely compiled for ARM processors on phones, so it would need an emulator to run t on windows.
You see, there is a huge gap between these technologies.
Upvotes: 4