Skip to content

Commit 04f0ce7

Browse files
committed
Force load the C++ standard library to make Mono happy
1 parent 724ca1e commit 04f0ce7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clr_loader/ffi/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ def load_hostfxr(dotnet_root):
3535

3636

3737
def load_mono(path=None, gc=None):
38+
# Preload C++ standard library, Mono needs that and doesn't properly link against it
39+
ffi.dlopen("stdc++", ffi.RTLD_GLOBAL)
3840
if path is None:
3941
from ctypes.util import find_library
4042

0 commit comments

Comments
 (0)