# How to call functions/use symbols from a static library archive using FFI

**URL:** https://discourse.julialang.org/t/how-to-call-functions-use-symbols-from-a-static-library-archive-using-ffi/118136
**Category:** General Usage
**Tags:** question, ffi
**Created:** [August 13, 2024, 2:25pm UTC](https://discourse.julialang.org/t/how-to-call-functions-use-symbols-from-a-static-library-archive-using-ffi/118136 "2024-08-13T14:25:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sivakon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sivakon/32/5691_2.png) [@sivakon](https://discourse.julialang.org/u/sivakon)
#### Post date: [August 13, 2024, 2:25pm UTC](https://discourse.julialang.org/t/how-to-call-functions-use-symbols-from-a-static-library-archive-using-ffi/118136/1 "2024-08-13T14:25:59Z")

</div>

Currently the docs only show shared library, how can I use ccall to import symbols from an archive .a?

---

<div class="post-metadata">

### Author: ![tomaklutfu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomaklutfu/32/2411_2.png) [@tomaklutfu](https://discourse.julialang.org/u/tomaklutfu)
#### Post date: [August 14, 2024, 1:25pm UTC](https://discourse.julialang.org/t/how-to-call-functions-use-symbols-from-a-static-library-archive-using-ffi/118136/2 "2024-08-14T13:25:27Z")

</div>

Static libraries can only be used in compilation process to build binaries. They are not directly available for dynamic loading. You may turn a static library into shared library by linking its object files to a shared object file(.so,.dll etc) and then you can load them dynamically but the conversion may not work due to the position independent code requirements.
