[Rcpp-devel] error: wrap is not a template function
On 22 May 2015 at 17:31, Fabio Tordini wrote:
| Solved! | | Apparently, declaration and definition of 'as' and 'wraps' were correct | - that explains why it worked as expected in a sample implementation. | | The problem was likely related to the order in which <Rcpp.h> (and | <RcppGSL.h>) were included (as Kevin suggested). Nice! And kudos to Kevin for catching this. | Following the 'sandboxed_server' example available in RInside, this | recipe worked out[1]: | | #include "SamData.hpp" | | #include <RcppCommon.h> | #include "samdataRcppWrapperDecl.h" | #include <Rcpp.h> | #include "samdataRcppWrapperDef.h" That should also be the recommended way in other packages and the vignette 'Rcpp-extending'. If it isn't, could you think of a way to make it clearer in the vignette? Dirk
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org