[Rcpp-devel] Compilation errors when building a package with RcppArmadillo code and using attributes
The RcppArmadillo.package.skeleton does not work as I am providing a
reference to a cpp file with attributes. I get this error:
Error in RcppArmadillo.package.skeleton("NewPackage", example_code = FALSE,
:
unused argument(s) (cpp_files = c("test_arma3.cpp"))
Howard
On Sun, Dec 2, 2012 at 11:22 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
On 2 December 2012 at 10:29, Howard Zail wrote:
| Thanks Yan. This solved the issue: I did the following change:
|
| Link against the Rcpp, blas and lapack libraries, by adding this line in
the
| Makevars
|
| PKG_LIBS = $(shell $(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()" )
$(LAPACK_LIBS)
| $(BLAS_LIBS) $(FLIBS)
| and this line to the Makevars.win:
| PKG_LIBS = $(shell $(R_HOME)/bin${R_ARCH_BIN}/Rscript.exe -e
"Rcpp:::LdFlags()
| ") $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
Right. This is both the default for RcppArmadillo --- see the skeleton/
directory in the installed package --- and its inline plugin. As JJ said,
not everything is fully automated yet.
But you wrote 'when I use "Rcpp.package.skeleton()..."' and that may have
been the error. Can you check if RcppArmadillo.package.skeleton() does
better?
Dirk
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20121202/3f3b3b9a/attachment.html>