# Creating a shared library with juliac

**URL:** <https://discourse.julialang.org/t/creating-a-shared-library-with-juliac/126477>\
**Category:** Tooling\
**Tags:** juliac\
**Created:** [March 2, 2025, 7:04pm UTC](https://discourse.julialang.org/t/creating-a-shared-library-with-juliac/126477 "2025-03-02T19:04:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmbates](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmbates/32/44_2.png) [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Post date:** [March 2, 2025, 7:04pm UTC](https://discourse.julialang.org/t/creating-a-shared-library-with-juliac/126477/1 "2025-03-02T19:04:43Z")

</div>

I would like to experiment with using R’s .Call interface to call Julia functions compiled into a shared library. See [Using rcopy and sexp methods to create a .Call interface to a compiled Julia library · Issue #556 · JuliaInterop/RCall.jl · GitHub](https://github.com/JuliaInterop/RCall.jl/issues/556) for more details.

I have not yet been able to compile a shared library and dyn.load it in R. My main development platform is an M1 MacBook and I am encountering the issue described in [Warning on Mac M1 · Issue #2 · TheCedarPrince/InteroperableJuliaBinaries · GitHub](https://github.com/TheCedarPrince/InteroperableJuliaBinaries/issues/2) I have also tried on a computer running Ubuntu and got an unresolved symbol. (I can provide more details if needed.)

Can someone point me to an example of successful creation of a shared library using recent juliac which I can try to imitate? The usual caveats apply - I know it is an experimental capability and under active development. However, I do think that easy ways to call Julia code from R will be a big boost for Julia adoption in data science and I am willing to work on the bleeding edge

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [March 2, 2025, 8:03pm UTC](https://discourse.julialang.org/t/creating-a-shared-library-with-juliac/126477/2 "2025-03-02T20:03:39Z")

</div>

See repo links in

> **[C codegen considered unnecessary: go directly to binary, do not pass C....](https://arxiv.org/abs/2502.01128)**
>
> Since time immemorial an old adage has always seemed to ring true: you cannot use a high-level productive programming language like Python or R for real-time control and embedded-systems programming, you must rewrite your program in C. We present a...
