Re: [Rcpp-devel] Rcpp shared libraries (?)

2022-08-03 Thread Jean Thioulouse
> Le 23 juin 2022 à 17:38, Serguei Sokol a écrit : > > Le 23/06/2022 à 17:12, THIOULOUSE JEAN a écrit : >> ... >>> I can make a PR if you wish. >> Yes, please do. Thanks a lot ! > > Done: https://github.com/sdray/ade4/pull/31 > Serguei. It works perfectly, thank you very much Serguei ! Jean

Re: [Rcpp-devel] Rcpp shared libraries (?)

2022-06-23 Thread Dirk Eddelbuettel
One belated follow-up: one can in general control visibility so - a function can be in C(++) and used by other C(++) functions (and we have examples) - a function can be exported to R easily via [[Rcpp::export()]] thanks to magic of Rcpp::compileAttributes() - a function can also be

Re: [Rcpp-devel] Rcpp shared libraries (?)

2022-06-23 Thread Serguei Sokol
Le 23/06/2022 à 17:12, THIOULOUSE JEAN a écrit : ... I can make a PR if you wish. Yes, please do. Thanks a lot ! Done: https://github.com/sdray/ade4/pull/31 Serguei. Le 23/06/2022 à 16:10, Jean Thioulouse a écrit : Le 23 juin 2022 à 16:04, Serguei Sokol a écrit : Le 23/06/2022 à

Re: [Rcpp-devel] Rcpp shared libraries (?)

2022-06-23 Thread THIOULOUSE JEAN
> Le 23 juin 2022 à 16:58, Serguei Sokol a écrit : > > Rcpp or plain C++ or even C ;) , you still have to declare used functions. > In Rcpp package, the most natural way to do it, is to put such declarations > in a file $pkg/inst/include/.h. In your case, it will be > inst/include/ade4.h > >

Re: [Rcpp-devel] Rcpp shared libraries (?)

2022-06-23 Thread Serguei Sokol
Rcpp or plain C++ or even C ;) , you still have to declare used functions. In Rcpp package, the most natural way to do it, is to put such declarations in a file $pkg/inst/include/.h. In your case, it will be inst/include/ade4.h In this file you put: #include int matcentrageCpp (arma::mat&

Re: [Rcpp-devel] Rcpp shared libraries (?)

2022-06-23 Thread Jean Thioulouse
> Le 23 juin 2022 à 16:04, Serguei Sokol a écrit : > > Le 23/06/2022 à 15:47, Jean Thioulouse a écrit : >> Thank you Serguei, I tried this, but I still get the "undeclared identifier" >> error for these internal functions during package compilation: >> clang++ -arch arm64 -std=gnu++14 >>

Re: [Rcpp-devel] Rcpp shared libraries (?)

2022-06-23 Thread Serguei Sokol
Le 23/06/2022 à 15:47, Jean Thioulouse a écrit : Thank you Serguei, I tried this, but I still get the "undeclared identifier" error for these internal functions during package compilation: clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG

Re: [Rcpp-devel] Rcpp shared libraries (?)

2022-06-23 Thread Jean Thioulouse
Thank you Serguei, I tried this, but I still get the "undeclared identifier" error for these internal functions during package compilation: clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG

Re: [Rcpp-devel] Rcpp shared libraries (?)

2022-06-23 Thread Serguei Sokol
Le 23/06/2022 à 15:02, THIOULOUSE JEAN a écrit : Hi Sorry to bother you again with my C/C++ problems in the ade4 package (available on CRAN & GitHub). Thanks to your help, I have succeeded in converting several of the C functions to C++ using Rcpp. Now the package compiles without problem

[Rcpp-devel] Rcpp shared libraries (?)

2022-06-23 Thread THIOULOUSE JEAN
Hi Sorry to bother you again with my C/C++ problems in the ade4 package (available on CRAN & GitHub). Thanks to your help, I have succeeded in converting several of the C functions to C++ using Rcpp. Now the package compiles without problem and all my C++ functions run fine in the dedicated