I am using swig to generate a C# wrapper to my code. But then I also need to link the dynamic library, which is a Linux .so file. Is it possible to do this from C#?
Thanks
Edit: using a .so file on Windows.
I am using swig to generate a C# wrapper to my code. But then I also need to link the dynamic library, which is a Linux .so file. Is it possible to do this from C#?
Thanks
Edit: using a .so file on Windows.
There is no direct way to do this. You need to create a native Windows version of all your native code (the so itself, plus all dependencies).
Other options include writing all your code on Linux, if possible, including the C# portion (using Mono). Or creating some sort of client/server setup, where your native code remains on Linux (as a server application) and your C# code goes on the Windows-client. If that is a viable solution for you is hard to tell without further details.
This Post seems to have some answers for Linux, are you trying to do this in Windows?
It's more than likely that your shared library will have been compiled to use linux command calls.
The only possible way to use linux .so files in a "windows" app would be to compile it (your app) using cygwin, but that way would make your windows app a posix app which means it would have to fire cygwin up everytime it runs.