Re: [Rcpp-devel] correct way of making custom as and wrap functions available to other packages

2015-07-17 Thread Simon Barthelmé
Thanks Thell, I'll take a look and report back Le 17/07/2015 17:33, Thell Fowler a écrit : > >Dear list, > >For a package I'm developing (https://github.com/dahtah/imager/) I had to ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org h

Re: [Rcpp-devel] correct way of making custom as and wrap functions available to other packages

2015-07-17 Thread Thell Fowler
Simon, Not sure if it'll help but take a look at https://github.com/Thell/RcppMultiPrecision/tree/wip-mpreal-wrappers Particularly the flags.R, inline.R and mpreal_wrap_example.cpp. When I built this Dirk pointed me to several example packages in the thread [Rcpp-devel] Rcpp RMpfr mpreal to mpfr

Re: [Rcpp-devel] correct way of making custom as and wrap functions available to other packages

2015-07-17 Thread Simon Barthelmé
Hi Kevin Thanks for your answer. I've tried declaring them as inline but the compiler (clang, haven't tried gcc) issues a warning saying it's going to ignore the inline statement. I'm assuming this is because the declaration is actually a template specialisation but I haven't found a definiti

Re: [Rcpp-devel] correct way of making custom as and wrap functions available to other packages

2015-07-17 Thread Dirk Eddelbuettel
On 17 July 2015 at 16:32, Simon Barthelmé wrote: | Dear list, | | For a package I'm developing (https://github.com/dahtah/imager/) I had | to write custom "as" and "wrap" functions for third-party classes. I'd | like to make these wrappers accessible to other developers via inline | C++ as wel

Re: [Rcpp-devel] correct way of making custom as and wrap functions available to other packages

2015-07-17 Thread Kevin Thornton
A good guess is that the as/wrap definitions in wrappers.h are the culprit (https://github.com/dahtah/imager/blob/master/inst/include/wrappers.h ). Try declaring them as inline, or separating the definition from the declarati

[Rcpp-devel] correct way of making custom as and wrap functions available to other packages

2015-07-17 Thread Simon Barthelmé
Dear list, For a package I'm developing (https://github.com/dahtah/imager/) I had to write custom "as" and "wrap" functions for third-party classes. I'd like to make these wrappers accessible to other developers via inline C++ as well as LinkingTo directives (so that they can be used in other