<div dir="ltr"><div><div><div>Hello,<br><br></div>Short version: Is it possible to instruct the code generator in `compileAttributes` to source local header files when generating RcppExports.cpp?<br><br></div>Long version: I'm trying to crib from the Dirk's examples in his recent UCB talk examples about function pointers (<a href="http://dirk.eddelbuettel.com/papers/rcpp_booth_uofc_oct2013-part2.pdf">http://dirk.eddelbuettel.com/papers/rcpp_booth_uofc_oct2013-part2.pdf</a>). In it, he uses a `typedef` to define the type of his function call. This is all great if using `sourceCpp` to slurp in the file directly, but I'm getting errors when compiling a package. I'd like to use attributes to export my functions at both the R level and as the target of function pointers, but this may be incompatible with attributes, at least at some level.<br>
<br>My (perhaps naive) attempts are giving errors about my `funcPtr` type not being defined. I've tried moving this definition to a header file, but even with `//[[Rcpp::depends(myheader)]]` or `\\[Rcpp::depends(myheader.h)]]`, the generated RcppExports.cpp file does not include `myheader.h`.<br>
<br></div><div>My (non-working) code can be found at:<br><br><a href="https://github.com/markmfredrickson/RItools/blob/ri-rcpp/src/teststatistics.cpp">https://github.com/markmfredrickson/RItools/blob/ri-rcpp/src/teststatistics.cpp</a><br>
<br></div><div>Thanks in advance,<br></div><div><br></div>-M<br><br></div>