Using the Boost C plus plus Library within Unity

Does anyone know how to integrate the Boost library into Unity? Specifically, I want to use the managed_shared_memory functionality within Boost.

Alternatively, is there a different way to create shared memory within Unity?

Boost is a C++ class library. You can’t simply “use” or “integrate” it in Unity. Unity only uses managed C# code for scripting. You can use native code plugins, but only c plugins. C++ libraries expose classes and methods only for use in C++. The point of Boost is to provide utilities for C++ and as such is quite useless for Unity. The best thing you can do is build a native DLL that might use Boost and provide some extern “C” methods which you can call from Unity.

C# / Mono has it’s own managed memory. We can’t suggest any solutions without knowing your final goal.

I have a project that uses a C++ plugin that call some boost code. Builds work great on my computer, but crash immediately on others computers. I need to figure out how to distribute boost with Unity. The crash report seems to obfuscate what’s going on with boost.