Re: [Rcpp-devel] [R-pkg-devel] moving from C to C++ with Rcpp in R package

2022-06-02 Thread Jean Thioulouse
But it seems that the C_ prefix must be added to _myPackage_myFunctionName (to get for example C__ade4_RVrandtestCpp) in the RcppExports.R file. So where should I modify the Rcpp::export tag ? Thanks Jean > Le 2 juin 2022 à 15:49, Dirk Eddelbuettel a écrit : > > > On 2 June 2022 at 08:32,

Re: [Rcpp-devel] [R-pkg-devel] moving from C to C++ with Rcpp in R package

2022-06-02 Thread Dirk Eddelbuettel
On 2 June 2022 at 08:32, Dirk Eddelbuettel wrote: | | (Removed CC to r-package-devel) | | On 2 June 2022 at 16:24, Ivan Krylov wrote: | | Unfortunately, this means editing RcppExports.R, which (I think) | | prevents you from enjoying the way Rcpp::compileAttributes() sets | | everything up for

Re: [Rcpp-devel] [R-pkg-devel] moving from C to C++ with Rcpp in R package

2022-06-02 Thread Serguei Sokol
Le 02/06/2022 à 15:32, Dirk Eddelbuettel a écrit : (Removed CC to r-package-devel) On 2 June 2022 at 16:24, Ivan Krylov wrote: | Unfortunately, this means editing RcppExports.R, which (I think) | prevents you from enjoying the way Rcpp::compileAttributes() sets | everything up for you. Yes. I

Re: [Rcpp-devel] [R-pkg-devel] moving from C to C++ with Rcpp in R package

2022-06-02 Thread Dirk Eddelbuettel
(Removed CC to r-package-devel) On 2 June 2022 at 16:24, Ivan Krylov wrote: | Unfortunately, this means editing RcppExports.R, which (I think) | prevents you from enjoying the way Rcpp::compileAttributes() sets | everything up for you. Yes. I think that is the best I came up with once too in a

Re: [Rcpp-devel] [R-pkg-devel] moving from C to C++ with Rcpp in R package

2022-06-02 Thread THIOULOUSE JEAN
Thank you Ivan and Dirk for your messages. I tried to follow your advice (modifying the src/init.c file by hand to add the things from the C++ function), but the function R_init_ade4 cannot be defined in both init.c and RcppExports.cpp. So I still have the same problem ("object