Open deanbodenham opened 6 years ago
Hi!
Sorry for the super-late reply. This is a pretty helpful gist:
https://gist.github.com/DavisVaughan/6597eac027303443bd69809b74646372
We're going to improve the docs at some point in the future but for now we're quite swamped with work.
Dear xtensor maintainers,
I recently discovered your
xtensor
library, and it looks great. I have been trying to get started with it either in C++ or with the associated R package, but unfortunately have not had any success in getting minimal examples to work. I was wondering if you could suggest where I might be missing a step, or if you could provide some minimal working examples.I have some experience using Rcpp and RcppArmadillo, and my first goal was to use
xtensor
with R.However, after installing the 'xtensor' R package, the example on your GitHub page
failed to work and resulted in the error:
Error: 'rcpp_hello_xtensor' is not an exported object from 'namespace:xtensor'
I looked at your
xtensor_r_example()
in the documentation for version 0.6.1-0 on CRAN, but could not get that to work without knowing how to define the tensor.I then tried the
sum_of_sines
example on your page (within a package framework): http://xtensor-r.readthedocs.io/en/latest/basic_usage.htmlbut this resulted in the errors:
Before I had tried including the line
in the description file, but this did not change the error messages. The above output is after creating a
Makevars
file containing CXX1XSTD = -std=gnu++14I am using Rcpp v0.12.7 (latest release).
After this, I tried to simply get a pure C++ example to work (no R). I am using OSX, and then tried installing xtensor with 'conda', as suggested on your page. I then tried the first example (after enclosing in a main) on http://xtensor.readthedocs.io/en/latest/basic_usage.html
however, this resulted in numerous error messages. I tried compiling with the standard gcc/g++ compilers on OSX, as well as with the gcc-4.9/g++-4.9 compilers.
After the conda version of
xtensor
was installed, I tried thextensor-r
examples again, but still received the same error messages.I apologise for the long post, but I wanted to detail the steps I tried. It seems that R/gcc is not finding the xtensor header files. Any suggestions for fixing this issue, or any minimal working examples for R, would be greatly appreciated.