# Help to build shared library Using PackageCompiler.jl

**URL:** <https://discourse.julialang.org/t/help-to-build-shared-library-using-packagecompiler-jl/23117>\
**Category:** General Usage\
**Created:** [April 13, 2019, 4:25pm UTC](https://discourse.julialang.org/t/help-to-build-shared-library-using-packagecompiler-jl/23117 "2019-04-13T16:25:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Post date:** [April 13, 2019, 4:25pm UTC](https://discourse.julialang.org/t/help-to-build-shared-library-using-packagecompiler-jl/23117/1 "2019-04-13T16:25:57Z")

</div>

Hi guys!

I need help. I want to build a shared library (`.dylib`, `.dll`) so that I can send it with my code to be loaded by another ground in a C++ software. I know that I can use `PackageCompiler.jl` to build a shared library. However, I could not figured out how to load and use the functions inside the library in the C++ software. Can anyone help me?

**EDIT** : Just to make some things clear, what I want is to create a library so that people can linking against it without needing to install Julia. Something the bundles everything.

---

<div class="post-metadata">

**Author:** ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Post date:** [June 17, 2019, 12:45pm UTC](https://discourse.julialang.org/t/help-to-build-shared-library-using-packagecompiler-jl/23117/2 "2019-06-17T12:45:42Z")

</div>

Bump! 🙂 Can anyone give me some tips here… I am kind of stuck. Maybe it is not possible at all.

---

<div class="post-metadata">

**Author:** ![pablosanjose](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pablosanjose/32/7006_2.png) [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Post date:** [June 17, 2019, 12:52pm UTC](https://discourse.julialang.org/t/help-to-build-shared-library-using-packagecompiler-jl/23117/3 "2019-06-17T12:52:43Z")

</div>

I don’t really know much, but I think the purpose of PackageCompiler is not to build a linkable library, just a sysimg to use with Julia itself, no?

---

<div class="post-metadata">

**Author:** ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Post date:** [June 17, 2019, 1:15pm UTC](https://discourse.julialang.org/t/help-to-build-shared-library-using-packagecompiler-jl/23117/4 "2019-06-17T13:15:58Z")

</div>

AFAIK, I can generate stand alone binaries of code linked against Julia’s libraries. What I want is to produce a library with everything, including my code, inside so that the user can link a software against it without needing to get any external file.

---

<div class="post-metadata">

**Author:** ![pablosanjose](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pablosanjose/32/7006_2.png) [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Post date:** [June 17, 2019, 1:17pm UTC](https://discourse.julialang.org/t/help-to-build-shared-library-using-packagecompiler-jl/23117/5 "2019-06-17T13:17:16Z")

</div>

I understand. I don’t know the answer, but would also be interested to know.

---

<div class="post-metadata">

**Author:** ![jean-pierre\_both](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jean-pierre_both/32/12636_2.png) [@jean-pierre\_both](https://discourse.julialang.org/u/jean-pierre_both)\
**Post date:** [July 20, 2019, 10:00am UTC](https://discourse.julialang.org/t/help-to-build-shared-library-using-packagecompiler-jl/23117/6 "2019-07-20T10:00:58Z")

</div>

Hi,

I had also difficulties using PackageCompiler to link against .so generated so (!)  
I just put at [jean-pierre both / Sotest-jl · GitLab](https://gitlab.com/jpboth/sotest-jl) a small commented test.

Hope it can be useful
