I'm trying to use SWIG for creating a C# wrapper to C, to be used in Xamarin.Android Project. I have a .so library (built with NDK in Eclipse Android Project as in here) and the header file.
Without using swig, i was able to consume the function as in here. Using this method, i could manually consume simple functions setting and returning string and int. But if the library consists of functions using structs, pointers and other, i have no idea on how to do these stuffs. Hence, i thought if SWIG could help me feel better by automatically creating a wrapper and i needn't worry on doing all the complicated stuffs which might appear in other third party libraries manually.
Now, I downloaded SWIG (on Windows OS) and set the environment variable path and i can see all the SWIG commands available (using swig --help as in here ) on my command promt.
My question is:
- How can i make the use of SWIG to consume the functions (that makes use of structs and pointers) available in the .so library, on my Xamarin.Android Project? How can i use just the header file and .so library to create a wrapper using SWIG and use the function directly from Xamarin.Android Project?
Thanks!