Use a shared library in a package

Hello, I’ve looking to a toy exercice: using a C++ shared library in a R package (Linux only)

  1. I want to create a shared library with a function foo that just takes a std::vector and multiplies it by 2.
  2. Create a toy package with Rcpp that can use this function from the .so

I found 2/3 resources online but it is either theoretical (no example) or describing how to write C++ sources and use in a package.

Would someone know a good resource or can help me with examples ?
Regards

Did you include Rcpp for everyone book in your list of resources? I'm pretty sure it has info you are looking for and then some.

1 Like

It’s great ressource thanks !
However I don’t see what I need in there, it only shows how to use C++ source code not use a shared lib.
Still thanks for that.