Your path for includes doesn't have julia/src, which is where julia.h lives.

On Tuesday, July 14, 2015 at 7:13:27 AM UTC-4, Kostas Tavlaridis-Gyparakis 
wrote:
>
>
>
>
> *>Related, what's in the directory /home/kostav/julia/usr/lib*When I run 
> the following command: 
>
> g++ -o test main.cpp -Wl,-rpath,/home/kostav/julia/usr/lib -I 
> /home/kostav/julia/src -I /home/kostav/julia/usr/include -I 
> /home/kostav/julia/src/support -L/home/kostav/julia/usr/lib -ljulia 
> -lLLVM-3.7svn
>
> And I also initialize julia inside c++ with the following command:
>
> jl_init_with_image("/home/kostav/julia/usr/lib/julia", "sys.so");
>
> It does work properly finally!
>
>
>
> *>Where is it?  Use that instead.*It's located at 
> /home/kostav/julia/usr/bin/julia
>
> Yet again when I upgrade the makefile accordingly and it does look like 
> this:
>
> CFLAGS   += $(shell /home/kostav/julia/usr/bin/julia  
> /home/kostav/julia/contrib/julia-config.jl --cflags)
> CXXFLAGS += $(shell /home/kostav/julia/usr/bin/julia  
> /home/kostav/julia/contrib/julia-config.jl --cflags)
> LDFLAGS  += $(shell /home/kostav/julia/usr/bin/julia  
> /home/kostav/julia/contrib/julia-config.jl --ldflags)
> LDLIBS   += $(shell /home/kostav/julia/usr/bin/julia  
> /home/kostav/julia/contrib/julia-config.jl --ldlibs)
> all: embed_example
>
> I do receive the following error:
>
> cc -DJULIA_INIT_DIR=\"/home/kostav/julia/usr/lib\" 
> -I/home/kostav/julia/usr/include/julia  -L/home/kostav/julia/usr/lib  
> embed_example.c  -Wl,-rpath,/home/kostav/julia/usr/lib -ljulia -o 
> embed_example
> embed_example.c:1:19: fatal error: julia.h: No such file or directory
>  #include <julia.h>
>                    ^
> compilation terminated.
> <builtin>: recipe for target 'embed_example' failed
> make: *** [embed_example] Error 1
>
>

Reply via email to