Interop to 32-bit and 64-bit C++ libraries in same project?

larsvlarsv Member ✭✭

My Xamarin project for ARM devices is built for AnyCPU mode. At runtime, depending on Android device, it seems to run in 32 or 64 bit mode. For C++ interop I then need my shared library present in 32 and 64 bit builds depending on if Xamarin decides to run my app in 32/64 bit mode.

Are there best practices WRT project configuration and building for this scenario?

One alternative is to force 32-bit mode, but as this is a photo app, more memory is better so if 64-bit mode is available then it will be gladly consumed.

I did something similar for Windows, detecting mode at runtime and invoking different interop DLLs depending on bit depth. I am however a novice with Xamarin.

Sign In or Register to comment.