| jl_value_t *ex = jl_exception_occurred(); |
Hello,
Just to be sure that I am understanding correctly what your proposal.
You suggest I should:
1) Completely uninstall Julia
2) Recompile the source code (i.e. run make)
3) Then try using julia from the source code build cxx package
4) Then perform the make install and link the version of julia of the decaxemical folder with my system
And hopefully this will work?
Hello again and thanks a lot for the suggestions.
Thing is, I went back to the source version of Julia where Cxx is already built and
runs properly, so there wasn't much for me to do, I run in terminal also the command of:
"addHeaderDir("/home/kostav/julia/src/")"
Then proceeded again with make install and run the version of julia from this folder but
still not being able to use or install Cxx. So, maybe I didn't understand properly what you
were suggesting for me to do in the source version of Julia...
Or maybe there is sth else I should try..?
You are still picking up the f42... version.
usr/lib/clang/Cxx attempts to access the files in these directories when it gets imported, and although addIncludeDir is supposed to help here, I could not make it work like that, so i ended up copying all of this to the installed directory (see the gist).Step 5. In addition for embedding the relative paths are off, so a couple of symbolic links need to be added.Step 6 access Cxx from embedding framework and I have some show and tell here for thatConsider the following file (index.js) this is taken from the Cxx example page, I simplifiedit to merely good ol' hello worldvar julia = require('node-julia');julia.eval('using Cxx');julia.eval('cxx""" #include<iostream> """');julia.eval('cxx""" void mycppfunction() { std::cout << "hello world" << std::endl; } """');julia.eval('julia_function() = @cxx mycppfunction()');julia.exec('julia_function');
and when run:bizarro% node index.js
hello world
So that's JITed-C++ within JITed-Julia within JITed-Javascript, which I think is a first.It's pretty slow because of all of the compiling going on, and there's a bunch of evalwhere there could be something else, but I think pre-compilation will fix that.Pretty exciting.
Step 1. Build and run make installStep 2. While still in the top level source directory, install Cxx as per the Cxx webpageStep 3. Take the installed directory structure and put it in an installed location.
Step 4. There are additional include files that Cxx needs access to after it has built whenever c++ source needs to be compiled,
they can be found in the following directories relative to the source tree root.
usr/include/{clang,llvm,llvm-c}
usr/lib/clang/
Cxx attempts to access the files in these directories when it gets imported, and although addIncludeDir is supposed to help here,
I could not make it work like that, so i ended up copying all of this to the installed directory (see the gist).
Step 5. In addition for embedding the relative paths are off, so a couple of symbolic links need to be added.
Symbolic links to link which files though?
Sorry if the questions I raise are already answered by the git, I just failed to understand it properly so that's
why I come back with these questions now.
/usr/local/julia/lib
bizarro% ls -l
total 16
drwxr-xr-x 4 jeffw staff 136 Jul 18 18:26 clang
lrwxr-xr-x 1 root staff 10 Jul 19 03:16 include -> ../include
drwxr-xr-x 49 jeffw staff 1666 Jul 18 20:11 julia
lrwxr-xr-x 1 root staff 1 Jul 19 03:16 lib -> .
Here are the symbolic links. I believe with some simple changes to Cxx, the need for thesewill disappear, but for now there's where it searches./usr/local/julia/lib
bizarro% ls -l
total 16
drwxr-xr-x 4 jeffw staff 136 Jul 18 18:26 clang
lrwxr-xr-x 1 root staff 10 Jul 19 03:16 include -> ../include
drwxr-xr-x 49 jeffw staff 1666 Jul 18 20:11 julia
lrwxr-xr-x 1 root staff 1 Jul 19 03:16 lib -> .
arr = @cxx maker->fillArr() (where fillArr is supposed to return an array)
So, I am not sure what is going wrong here...
double ArrayMaker::ArrayMak(int iNum, float fNum) {
jl_init(JULIA_INIT_DIR);
jl_atexit_hook();
return sol;
}
}