Hello everybody,
i really can't get through this problem. I have a Xamarin.iOS app and need to static link to a bunch of native C++ libraries (libXXX.a). The program compiles but throws a EntryPointNotFoundException on runtime when invoking any native method.
I have added the native libraries as static references under "Native Libraries". I have set the "Is C++" option to all of them. I set "Force Load" only on the library that contains my entry point (i.e. the function that i want to call from C#), i cannot set ForceLoad everywhere because i gives some name conflicts with unneeded code. I have also set the necessary frameworks in the "Frameworks" property.
My entry point on the C++ side, library libc_wrapper.a:
extern "C" { void* sts_create_context() { //... } }
and on the C# side:
[DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr sts_create_context();
If i change the name of the DllImport method, i get compile-time "Native linking error", this means that the sts_create_context() method exists on the library. However, on runtime, i get the exception.
Have you any suggestions? Any help would be appreciated. Thanks in advance.
(i attach a build log with -v -v -v -v )