[Rcpp-devel] Local .h files and Rcpp attributes

Dirk Eddelbuettel edd at debian.org
Sat Oct 19 20:09:40 CEST 2013


On 19 October 2013 at 17:55, Romain Francois wrote:
| Try putting your declarations into a RItools.h file in inst/include/ or 
| src/ in your package, i.e. have this in RItools.h
| 
| typedef double (*testStat)(NumericVector, NumericVector);
| 
| and add:
| 
| PKG_CPPFLAGS += -I../inst/include/

(or use  PKG_CPPFLAGS += -I.  if you use src/ instead)
 
| to your Makevars and Makevars.win.

Yep -- I was just for two hours and thought of the same trick.  Then #include
the file in the file your are using Attributes with.  

Dirk

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


More information about the Rcpp-devel mailing list