Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Xamarin.Forms PCL and SWIG PInvoke C++

$
0
0

We have a core set of C++ code that we use in projects on iOS (using Objective-C++) and Android (using SWIG to Java). I would like to reuse this code in a Xamarin Forms based app, but am getting stuck. I have tried creating a core PCL which can be used in a forms app, but the PCL can't reference the appropriate types in System.Runtime.InteropServices; specifically HandleRef. I am guessing this is because PCLs are deliberately restricted so that they can run anywhere. However; now I simply don't know how to create a lib that can be used in my Forms app.

Can this be done; has anyone been successful with it?

Converting the C++ code to C# is simply not an option here (which would have been my approach in previous companies)

Thanks,

Steve.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>