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

**URL:** <https://discourse.julialang.org/t/different-behaviours-in-linux-and-macos-with-julia-embedded-in-c/18101>\
**Category:** General Usage\
**Tags:** embedding, linux\
**Created:** [November 28, 2018, 3:55pm UTC](https://discourse.julialang.org/t/different-behaviours-in-linux-and-macos-with-julia-embedded-in-c/18101 "2018-11-28T15:55:54Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![vitreo12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vitreo12/32/4028_2.png) [@vitreo12](https://discourse.julialang.org/u/vitreo12)\
**Post date:** [November 30, 2018, 11:04am UTC](https://discourse.julialang.org/t/different-behaviours-in-linux-and-macos-with-julia-embedded-in-c/18101/13 "2018-11-30T11:04:56Z")

</div>

> [@tkf](#):
>
> Alternatively, not sure if it works, but how about creating a shim library `libShimTestCJulia.so` that `dlopen` s actual library `libTestCJulia.so` with `RTLD_GLOBAL` ?

This is exactly what I ended up doing, and it works. It is not the most elegant solution, but at least it is something working both on MacOS and Linux.

---

_[View the full topic](https://discourse.julialang.org/t/different-behaviours-in-linux-and-macos-with-julia-embedded-in-c/18101)._
