# Julia v0.3 interface with C / C++

**URL:** <https://discourse.julialang.org/t/julia-v0-3-interface-with-c-c/8321>\
**Category:** General Usage\
**Tags:** embedding\
**Created:** [January 12, 2018, 3:41pm UTC](https://discourse.julialang.org/t/julia-v0-3-interface-with-c-c/8321 "2018-01-12T15:41:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nextr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nextr/32/3131_2.png) [@nextr](https://discourse.julialang.org/u/nextr)\
**Post date:** [January 12, 2018, 3:41pm UTC](https://discourse.julialang.org/t/julia-v0-3-interface-with-c-c/8321/1 "2018-01-12T15:41:40Z")

</div>

Hello,

I’m new in Julia. I inherited of a project on Julia v0.3 and need to use it from within a C program.

The steps I want to achieve are :

- Compile my Julia project to create a .ji file
- create .so library of my julia project
- write a .h interface in order to use it from my C project

The problems I encountered start at the begin : While v0.4 and upper of julia compiler has a --output-ji option, in v0.3 I don’t know how to do that.

Anyone knows how can I create a .ji precompiled file using Julia v0.3 ? Is there any package compatible to v0.3 to do so ?

Thank you in advance.

Nextor

---

<div class="post-metadata">

**Author:** ![ssfrr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ssfrr/32/3736_2.png) [@ssfrr](https://discourse.julialang.org/u/ssfrr)\
**Post date:** [January 12, 2018, 3:57pm UTC](https://discourse.julialang.org/t/julia-v0-3-interface-with-c-c/8321/2 "2018-01-12T15:57:49Z")

</div>

Hi Nextor, welcome to the Julia community!

If you’re planning on maintaining this project I’d recommend you upgrade  
to a more recent Julia version. A lot of development has happened since  
0.3, and most help you’ll find on the forums will be from folks with  
experience in more recent ways of doing things.  
One process for upgrading would be to first run the code with Julia 0.4,  
which will display deprecation warnings that should also provide  
guidance for what needs to change, then do the same with Julia 0.5 and  
0.6. If you try to go straight from 0.3 → 0.6 there will be things that  
show errors rather than deprecation warnings.  
Also 0.7 is on the horizon, so in the coming weeks and months there will  
be other folks making the 0.6-\>0.7 transition and you’ll be in good  
company. 🙂  
Also, depending on your deployment environment you don’t necessarily  
have to statically-compile your package into a `.so` file, you can just  
link against `libjulia.so` and load your code the same way the normal  
`julia` process would. See the [embedding page of the manual]  
([https://docs.julialang.org/en/stable/manual/embedding/#](https://docs.julialang.org/en/stable/manual/embedding/#)) for more info.  
-s

---

<div class="post-metadata">

**Author:** ![nextr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nextr/32/3131_2.png) [@nextr](https://discourse.julialang.org/u/nextr)\
**Post date:** [January 15, 2018, 1:49pm UTC](https://discourse.julialang.org/t/julia-v0-3-interface-with-c-c/8321/3 "2018-01-15T13:49:53Z")

</div>

Hi SSFRR, thank you for your response !

I think I will take into account your opinion and try to upgrade this project to the latest stable version of Julia.

Thanks for your help.

Nextor
