[Rcpp-devel] Avoiding having to write .h files

Søren Højsgaard sorenh at math.aau.dk
Tue Feb 25 12:28:15 CET 2014

Dear all,

If in a package I have foo1.cpp with function fun1 and foo2.cpp with fun2 (which uses fun1 from foo1.cpp) then I must write foo1.h and include in foo2.cpp. Right? Is there another approach so that I do not have to write these header files?

Using Rcpp::interfaces(r,cpp) should take care of that (according to the Rcpp-attributes vignette, at least that is my understanding) but I have seen on the list that there is a bug in this feature with the current Rcpp version (and also with the devel version on github).



More information about the Rcpp-devel mailing list