com.unity.webrtc icon indicating copy to clipboard operation
com.unity.webrtc copied to clipboard

fix: remove static libstdc++ linking on Linux to prevent potential crashes

Open xfxdev opened this issue 8 months ago • 1 comments

fix #1079

Unity on Linux is dynamically linked against the system's libstdc++.so. Statically linking libstdc++ in a native plugin caused runtime mismatches, leading to crashes when destroying C++ standard library objects.

This was observed with local std::stringstream instances, but likely affects other STL types relying on shared runtime state (e.g. std::locale, iostreams, allocators).

Switched to dynamic linking of libstdc++ to ensure compatibility with Unity’s runtime environment.

xfxdev avatar Apr 17 '25 18:04 xfxdev