Apologies if I've missed something, I've had a look and can't find an 
answer.

I'm trying to compile either examples/embedding.c or the very simple test.c 
example shown on http://julia.readthedocs.org/en/latest/manual/embedding/ I'm 
having no luck.

The manual page provides a gcc compile command:

gcc -o test -I$JULIA_DIR/include/julia -L$JULIA_DIR/usr/lib -ljulia test.c
>
>
I have a clone of the julia source from today compiled successfully however 
JULIA_DIR/include/julia does not exist. After changing the include path so 
all header files were found I ended up with:

gcc -o test -I$JULIA_DIR/src/ -I$JULIA_DIR/src/support/ 
-I$JULIA_DIR/usr/include/ -L$JULIA_DIR/usr/lib -ljulia test.c
>
>
However that fails with:

/tmp/ccimvmGj.o: In function `main':
test.c:(.text+0x15): undefined reference to `jl_init'
test.c:(.text+0x1c): undefined reference to `jl_root_task'
test.c:(.text+0x2e): undefined reference to `jl_root_task'
test.c:(.text+0x4f): undefined reference to `jl_handle_stack_switch'
test.c:(.text+0x59): undefined reference to `jl_eval_string'
collect2: error: ld returned 1 exit status

Tell me I'm being an idiot and have missed something really simple - if not 
surely the title examples of embedding Julia should not be this difficult 
to get running?

Reply via email to