For source build I link with libjulia.so in julia/usr/lib.

For binary builds I link with /lib/julia/libjulia.so

Here is a little example of my Cmake setup and c++ file: 
https://github.com/KristofferC/exploration/tree/master/embed_julia

On Tuesday, December 8, 2015 at 6:27:37 PM UTC+1, Bill Hart wrote:
>
> I tried the example [1] for embedding Julia in C, using the latest 
> Julia-0.5 nightly, but have run into problems.
>
> One trivial problem I had was that jl_atexit_hook(); seems to now require 
> a return argument. That was easy to fix.
>
> However the C program given at [1] didn't link. It claims to not be able 
> to find libjulia. Yet Julia is working fine on the system.
>
> I did a search to see if I could find libjulia and I have 
> /usr/lib/x86_64-linux-gnu/julia/libjulia.so. But linking against this 
> causes undefined symbol errors, and indeed nm seems to indicate that this 
> library contains no symbols (it may be just a leftover from an old version 
> of Julia I had installed or something).
>
> Is embedding currently supported with the nightlies? Do I need to install 
> a different Ubuntu package to get libjulia? (I'm using Ubuntu 14.04).
>
> On a different, but related note, does anyone know what the current plans 
> are for producing .o files or executables from Julia, rather than using it 
> via the REPL? I know there was at one point some kind of compiler 
> available. Has that been abandoned, or is it likely to resurface again in 
> some form? I realise it's probably technically feasible. I'm really just 
> asking whether it sits in the currently forseeable roadmap or not.
>
> Bill.
>
> [1] http://docs.julialang.org/en/latest/manual/embedding/
>

Reply via email to