[Rcpp-devel] Extending Rcpp with a dummy class

Dirk Eddelbuettel edd at debian.org
Fri Feb 14 13:31:40 CET 2014

On 14 February 2014 at 11:02, Alessandro Mammana wrote:
| Thanks a lot, I misunderstood the document
| http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-extending.pdf
| .
| But there is still a problem when I try to use these classes
| definitions in a package.
| If these classes are defined in the file classdef.cpp, I somehow need
| to add the line #include "classdef.cpp" in the file RcppExports.h.
| Because this file is automatically generated, I looked for some Rcpp
| attribute that adds this line. Rcpp::depends could be the one, but
| I don't see how to use it, since classdef.cpp is not an Rcpp package.
| I also tried just to add -I../inst/include in the Makevars and a
| header classdef.h in
| that directory, but this does not seem to add the desired line.
| One again I am lost...
| What should I do?

That is a different issue. Rcpp Attributes is wonderful to automate getting
functions to R.

It has nothing for as<> and wrap. You have to do that the old school way. 

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

More information about the Rcpp-devel mailing list