How can I use a C++ shared library in a R package

Are you referring to a library installed in the OS or do you want to include the library with the package? Which OS(s) do you target? Is the librrary header only or compiled?

Some select examples:

  • https://gist.github.com/jeroen/89073a6387e7169a40ec
  • RcppGSL links to a system installed GSL
  • nloptr links to a system installed nlopt or downloads and compiles the library
  • rzmq links to a system installed ZMQ
  • RcppArmadillo and RcppEigen ship header only libraries that are used by many other packages
2 Likes