Skip to content
Prev 5475 / 10988 Next

[Rcpp-devel] Principal Component in Armadillo

Thanks for your explanation, Dirk! Indeed, I looked at Armadillo
documentation, but it was not clear what was the kind of return.

Regarding the linking error, I had created the package using
Rcpp.package.skeleton (because I didn't know I was going to use
RcppArmadillo), and then I made the necessary changes according to
documentation (
http://romainfrancois.blog.free.fr/index.php?post/2010/05/19/RcppArmadillo-0.2.1).
So I created the package again using "RcppArmadillo.package.skeleton" and
everything worked fine!

Actually, what "RcppArmadillo.package.skeleton" creates is slightly
different from what is described on documentation (maybe it is system
dependent):

- Documentation

# Makevars
PKG_LIBS = $(shell $(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()" )
$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

# Makevars.win
PKG_LIBS = $(shell Rscript.exe -e "Rcpp:::LdFlags()") $(LAPACK_LIBS)
$(BLAS_LIBS) $(FLIBS)

- Documentation

# Makevars
PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(LAPACK_LIBS)
$(BLAS_LIBS) $(FLIBS)

# Makevars.win
PKG_LIBS = $(shell $(R_HOME)/bin/Rscript.exe -e "Rcpp:::LdFlags()")
$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)


So, it seems that the R libraries was not being imported during the package
compilation; problem solved!

Regards,

Jo?o Daniel


2013/3/11 Dirk Eddelbuettel <edd at debian.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130312/c52fc95d/attachment.html>