Different behaviours in Linux and MacOs with Julia embedded in C++

That’s Libdl.jl documentation so I don’t think that’s relevant for using dlopen from dlfcn.h.

I know it’s ugly but maybe you can pre-load libjulia using LD_PRELOAD environment variable when invoking the host executable?

Alternatively, not sure if it works, but how about creating a shim library libShimTestCJulia.so that dlopens actual library libTestCJulia.so with RTLD_GLOBAL?

1 Like