On 21 February 2024 at 09:21, Iñaki Ucar wrote: | Could you please provide more details about what you tried so far and what are | the issues you found? A link to a public repo with a test case would be even | better.
Seconded! I think I also did something like that 'way early' and 'way simply'. In just one file you can just have. class Foo { ... }; // forward declaration, or actual declaration static Foo* myfooptr = nullptr; followed by a few simple Rcpp function to init (ie allocated), set a value, get a value and maybe destroy at end (even callable via on.exit() from R). The key really is to differentiate between types Rcpp knows, and those types or classes you have that it doesn't -- so you have to write accessors in terms of the types R knows. We must have examples for that somewhere... Cheers, Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel