# Calling my own Julia module from C

**URL:** https://discourse.julialang.org/t/calling-my-own-julia-module-from-c/23779
**Category:** New to Julia
**Created:** [May 2, 2019, 2:15pm UTC](https://discourse.julialang.org/t/calling-my-own-julia-module-from-c/23779 "2019-05-02T14:15:30Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Pbellive](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pbellive/32/3604_2.png) [@Pbellive](https://discourse.julialang.org/u/Pbellive)
#### Post date: [May 6, 2019, 9:49pm UTC](https://discourse.julialang.org/t/calling-my-own-julia-module-from-c/23779/2 "2019-05-06T21:49:41Z")

</div>

I don’t have too much experience with this but I’ve gotten it to work. I found [this thread](https://discourse.julialang.org/t/calling-jl-gc-push1-multiple-times/18666) very helpful. The thread is about dealing with garbage collection when calling julia from C but the first post has a good example of loading a module from C (C++ actually but I think everything there works in C) and then calling a function from that module. I’ve used that approach to call my own modules from C. As far as I can tell loading modules is not in the embedding documentation though so I’m not sure if there’s a more direct way to go about it.

---

_[View the full topic](https://discourse.julialang.org/t/calling-my-own-julia-module-from-c/23779)._
