Re: [Rcpp-devel] error: wrap is not a template function

2015-05-22 Thread Dirk Eddelbuettel
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 (and | ) were included (as Kevin

Re: [Rcpp-devel] error: wrap is not a template function

2015-05-22 Thread Fabio Tordini
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 (and ) were included (as Kevin suggested). Following the 'sandboxed_server' example ava

Re: [Rcpp-devel] error: wrap is not a template function

2015-05-21 Thread Qiang Kou
Hi, Fabio, I think it will be better if you can open a repo on github and upload your package. Besides, I can give you a simple example I wrote before [1]. Best wishes, KK [1] https://github.com/thirdwing/RcppDL/blob/master/src/util.h On Thu, May 21, 2015 at 11:17 AM, Fabio Tordini wrote:

Re: [Rcpp-devel] error: wrap is not a template function

2015-05-21 Thread Kevin Ushey
Fabio, Is it possible that is getting included before that header file is included? If that were the case, that would imply would be getting #include'd before you're able to make your as / wrap specializations. Just a guess... Kevin On Thu, May 21, 2015 at 10:15 AM, Dirk Eddelbuettel wrote: >

Re: [Rcpp-devel] error: wrap is not a template function

2015-05-21 Thread Dirk Eddelbuettel
On 21 May 2015 at 12:59, Gábor Csárdi wrote: | https://github.com/search?utf8=%E2%9C%93&q= | wrap+as+user%3Acran+language%3AC%2B%2B&type=Code | | But unfortunately both wrap and as are non-specific. Throwing 'template' in front of both seems to narrow this. Nice! https://github.com/search?u

Re: [Rcpp-devel] error: wrap is not a template function

2015-05-21 Thread Gábor Csárdi
https://github.com/search?utf8=%E2%9C%93&q=wrap+as+user%3Acran+language%3AC%2B%2B&type=Code But unfortunately both wrap and as are non-specific. G. On Thu, May 21, 2015 at 12:53 PM, Dirk Eddelbuettel wrote: > > On 21 May 2015 at 12:34, Gábor Csárdi wrote: > | On Thu, May 21, 2015 at 12:27

Re: [Rcpp-devel] error: wrap is not a template function

2015-05-21 Thread Dirk Eddelbuettel
On 21 May 2015 at 12:34, Gábor Csárdi wrote: | On Thu, May 21, 2015 at 12:27 PM, Dirk Eddelbuettel wrote: | | Apparently :-/   Whenever I add as<>() and wrap() I start by re-studying | working examples.  RcppBDT has a few; I have written a few other ones. | | I keep forgetting the s

Re: [Rcpp-devel] error: wrap is not a template function

2015-05-21 Thread Gábor Csárdi
On Thu, May 21, 2015 at 12:27 PM, Dirk Eddelbuettel wrote: > > Fabio, > > On 21 May 2015 at 17:53, Fabio Tordini wrote: > | I actually supplied a definition, right after the class implementation, > > I am so sorry -- I clearly missed that. > > | Am I doing something wrong here? > > Apparently :-/

Re: [Rcpp-devel] error: wrap is not a template function

2015-05-21 Thread Dirk Eddelbuettel
Fabio, On 21 May 2015 at 17:53, Fabio Tordini wrote: | I actually supplied a definition, right after the class implementation, I am so sorry -- I clearly missed that. | Am I doing something wrong here? Apparently :-/ Whenever I add as<>() and wrap() I start by re-studying working examples.

Re: [Rcpp-devel] error: wrap is not a template function

2015-05-21 Thread Fabio Tordini
Hi Dirk, I actually supplied a definition, right after the class implementation, as I wrote before: // DECLARATION class SamData { // CLASS IMPLEMENTATION }; // WRAP / AS DEFINITION namespace Rcpp { template<> SEXP wrap(const SamData &s) { return Rcpp::List::create( Rcpp::Named("Chr1")

Re: [Rcpp-devel] error: wrap is not a template function

2015-05-21 Thread Dirk Eddelbuettel
On 21 May 2015 at 17:17, Fabio Tordini wrote: | while extending Rcpp with my C++ classes, I received hundreds of " | 'wrap' is not a template function" and " 'as' is not a template | function" errors when compiling. Beside this, I get an impressive list | of errors referring to RcppGSL files. |

[Rcpp-devel] error: wrap is not a template function

2015-05-21 Thread Fabio Tordini
Hello, while extending Rcpp with my C++ classes, I received hundreds of " 'wrap' is not a template function" and " 'as' is not a template function" errors when compiling. Beside this, I get an impressive list of errors referring to RcppGSL files. The library from which my classes come from m