The error you get is because Rcpp.h
is included before RcppArmadillo.h
, Rcpp.h
is included by RInside.h
.
For the magic that RcppArmadillo
gives you, the file RcppArmadillo.h
needs to be loaded before Rcpp.h
. So I suggest you do this:
#include <RcppArmadillo.h>
#include <RInside.h>