Re: [Rcpp-devel] Question about custom as and wrap functions

2013-04-26 Thread JJ Allaire
Okay, very glad to hear you've got things working! J.J. On Fri, Apr 26, 2013 at 3:35 AM, Finlay Scott wrote: > Fixed it. > It was me making a stupid mistake. I had: > > PKG_CXXFLAGS=-I../inst/include > > in the Makevars when I should have had > > PKG_CPPFLAGS=-I../inst/include > > After using J.

Re: [Rcpp-devel] Question about custom as and wrap functions

2013-04-26 Thread Finlay Scott
Fixed it. It was me making a stupid mistake. I had: PKG_CXXFLAGS=-I../inst/include in the Makevars when I should have had PKG_CPPFLAGS=-I../inst/include After using J.J.'s suggestion of renaming the header files, the package now compiles and my minimal test now works. Thanks to everyone for re

Re: [Rcpp-devel] Question about custom as and wrap functions

2013-04-25 Thread Dirk Eddelbuettel
On 25 April 2013 at 10:47, Finlay Scott wrote: | Thanks for the reply. I followed your suggestion and changed the name of the | header file in /inst/include to 'asWrapExample.h' (the name of the package). I | then changed the #include in the 'DummyClass_example.cpp' file to reflect that | change.

Re: [Rcpp-devel] Question about custom as and wrap functions

2013-04-25 Thread JJ Allaire
Finlay, Are you running Rcpp 0.10.3 (that version is required for the behavior I mentioned to work). If you could provide a fully self-contained reproducible example then it will be pretty easy for us to track down the source of the troubles (perhaps create a simple test package then upload it to

Re: [Rcpp-devel] Question about custom as and wrap functions

2013-04-25 Thread Finlay Scott
Thanks for the reply. I followed your suggestion and changed the name of the header file in /inst/include to 'asWrapExample.h' (the name of the package). I then changed the #include in the 'DummyClass_example.cpp' file to reflect that change. I also added: PKG_CXXFLAGS=-I../inst/include To the to

Re: [Rcpp-devel] Question about custom as and wrap functions

2013-04-24 Thread JJ Allaire
Hi Finlay, If you name your include file the same name as your package then it will be included automatically in RcppExports.cpp. The convention at work here is that any custom as/wrap handlers should be accumulated (or referenced from) that single file. This mirrors the existing convention used b