# How to reopen a shared library?

**URL:** <https://discourse.julialang.org/t/how-to-reopen-a-shared-library/80642>\
**Category:** General Usage\
**Created:** [May 7, 2022, 12:41am UTC](https://discourse.julialang.org/t/how-to-reopen-a-shared-library/80642 "2022-05-07T00:41:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsjie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jsjie/32/22477_2.png) [@jsjie](https://discourse.julialang.org/u/jsjie)\
**Post date:** [May 7, 2022, 12:41am UTC](https://discourse.julialang.org/t/how-to-reopen-a-shared-library/80642/1 "2022-05-07T00:41:56Z")

</div>

I’m using a shared library by `ccall` in my code, it works fine as long as the library does not change.  
However, if I’ve used the library in Julia REPL, then changed c source code and recompiled the library, the Julia REPL will continue to use the old version.  
I suspect that something has been cached about the shared library, and I only need to clean them up to use the new version. But I have no idea how to do it. Any ideas are appreciated.

ps: Maybe if I am using Libdl, I can just `dlclose` then `dlopen` again. But I’m using `ccall` directly and not using Libdl.
