Le 19/10/13 20:09, Dirk Eddelbuettel a écrit :

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.

RcppExports.cpp will automatically include a .h that has the same name as the package and is located in inst/include, iirc.

Romain

--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30

_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to