Specifically I think this will not work because of the following: 
 

> double ArrayMaker::ArrayMak(int iNum, float fNum) {
>
>     jl_init(JULIA_INIT_DIR);
>
>
>     jl_atexit_hook();
>     return sol;
> }
> }
>
>
What this is doing it starting up a 2nd julia engine inside of the original 
julia engine, and that can only work if julia has
no globals that must only be initialized once and all mutual exclusive 
sections protected by mutex, (i.e. thread safe),
and currently it is not. 

In other words you're going beyond the question can Julia be embedded in 
C++ as well as can C++ be embedded
in Julia simultaneously; answer is yes.  You're asking can Julia be 
embedded within itself, and I think the answer is
no.

But from what you're describing as the problem you're attempting to  solve, 
you don't really to accomplish Julia inside
Julia. You just need to call C++ from Julia.

What happens if you just simply leave out the calls to jl_init and 
jl_atexit_hook?

Reply via email to