CesiumGS/cesium-unity

Statically link C runtime library on Windows

kring opened this issue · 0 comments

We build the native code in to-be-released versions of Cesium for Unity using Visual Studio 2019 and don't explicitly specify any run-time library options. As a result, I believe we effectively end up using /MD, which means that the appropriate version of the C runtime library must be available at runtime. In other words, end users must have a "Visual C++ Redistributable" installed with a version equal to or higher than the compiler we used to build it (including patches).

Unity itself doesn't require a Visual C++ Redistributable (source), so it's rather inconvenient that Cesium for Unity does. I think if we compile with /MT instead, we won't need any extra DLLs at runtime. Our built DLLs might get noticeably bigger, but it's probably worth it.