- Home /
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?
Answer by Bunny83 · Dec 07, 2015 at 02:39 AM
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.
Answer by zerophase · Feb 22, 2016 at 11:32 PM
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.
Your answer
Follow this Question
Related Questions
Runtime error 2 Answers
How to use UnityEngine library in c++ to develop game server? 0 Answers
Physics.simulate allocates memory each frame 0 Answers
Alpha 8 to save Texture size? 4 Answers