[Rcpp-devel] basic usage help
Davor Cubranic
cubranic at stat.ubc.ca
Thu May 27 03:31:41 CEST 2010
On 2010-05-26, at 4:08 PM, Vinh Nguyen wrote:
> Also, I didn't include BLAS or LAPACK linking -- still don't know how
> to get the compilation flags easily. I read the skeleton stuff but I
> don't understand (sorry).
Just put in your package's 'src' directory the Makevars file that's generated by RcppArmadillo's package.skeleton function. This is what it looks like on my machine:
PKG_LIBS = $(shell $(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()" ) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
How do you compile the code, by the way? It sounds like you do it by hand. Why not let R do it? With the above Makevars and the correct 'Depends' line in your package description (again, see the skeleton), you won't have to muck about with compiler switches and lookup paths, and everything should 'just work'.
Davor
More information about the Rcpp-devel
mailing list