Examples of using C++ and C# with Xamarin.
CppLibrary
is a core library.CSharpProjects
CppSharpSharedLibrary
a wrapper for the core library using CppSharp.iOSXLExample
AndroidXLExample
WindowsXLExample
MacXLExample
Precompiled
Toolchains
is needed forcmake
.compile.sh
compiles the core library for all platforms, and move results to thePrecompiled
.
- Code from
CSharp-Cpp-Interop
andCSharp-Cpp-SWIG
won't work on iOS, cause of AOT. On the other handCppSharp
works, but with modifications in the generated file: MonoPInvokeCallbackAttribute, Limitations. - A name of the library in
DllImport
is changed depending on a platform.