I have a X.F. that needs to use native library and .net standard projects.
I add my c library, compiled for iOS (mylib.a) and Android (mylib.so), in the iOS and Android projects in the right places
I made simple tests calling this library from within iOS and Android projects and it works well
For my needs, in my solution I also have a .NET Stardard project, that 'talk' my mylib library.
Unforunately in .NET Standard projects I can't use preprocessing directive, so I am not able to make the right DLLImport declaration for iOS and Android,
for example like that:
#if Android [System.Runtime.InteropServices.DllImport("mylib")] private static extern int my_c_func(byte stato, UInt16 attempts); #elif iOS [System.Runtime.InteropServices.DllImport("__Internal")] private static extern int my_c_func(byte stato, UInt16 attempts); #endf
I wich way I should solve my problem?