<p>This is almost surely a duplicate but I am in-between tasks and cannot search now...</p>
<p>&quot;It's still complicated&quot; but Rcpp 1.0.5 now also ship this <a href="https://arxiv.org/abs/1911.06416" rel="nofollow noreferrer">arXiv paper I wrote on this</a> as this <a href="https://cloud.r-project.org/web/packages/Rcpp/vignettes/Rcpp-libraries.pdf" rel="nofollow noreferrer">vignette</a>.  In short, you need to differentiate between</p>
<ul>
<li>header-only you can ship or include</li>
<li>small-ish library you include and build</li>
<li>an external library</li>
</ul>
<p>The third one is hardest as you now have the problem of getting it to CRAN and your users.</p>
How to build an external C++ library to use with R/Rcpp (e.g. Boost)
<p>I can't seem to find anything on the internet which show you how to build and compile a C++ library such that it can be used in R via the Rcpp package. I am missing some steps where the library is somehow linked to R tools</p>
<p>For instance how do you get the boost library working with R or any other such library?</p>
<p>Normal instructions:</p>
<p><a href="https://andres.jaimes.net/718/how-to-install-the-c-boost-libraries-on-windows/" rel="nofollow noreferrer">https://andres.jaimes.net/718/how-to-install-the-c-boost-libraries-on-windows/</a>
<a href="https://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html#or-build-from-the-command-prompt" rel="nofollow noreferrer">https://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html#or-build-from-the-command-prompt</a></p>