Ok, this did solve my problem.
Now I will proceed with trying to connect a big c++ project with julia and
see what happens there, in the very optimistic case where I proceed without
any problems I will let you know just for reference, otherwise I will
return with
the new errors and mistakes I receive.
Thanks a lot for all the help and suggestions so far!
On Thursday, July 30, 2015 at 11:47:27 PM UTC+2, Jeff Waller wrote:
>
>
> 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?
>
>