[Rcpp-devel] Principal Component in Armadillo

Dirk Eddelbuettel edd at debian.org
Tue Mar 12 18:41:27 CET 2013


On 12 March 2013 at 14:10, João Daniel Nunes Duarte wrote:
| 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

Eek. That is a post that is almost three years old.  Why don't you look at
the documentation in the package you use?

| 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)

You labeled both sides 'Documentation' ...   

Anyway, these are all identical apart from how Rscript is invoked.  They key
is the return of LdFlags combined with three values given.

Dirk 

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  


More information about the Rcpp-devel mailing list