<p>Dirk's paper <a href="https://arxiv.org/abs/1911.06416" rel="nofollow noreferrer">"Thirteen Simple Steps for Creating An R Package with an External C++ Library"</a> gives an example <code>src/Makevars</code>:</p>

<pre><code>CXX_STD = CXX11
PKG_CFLAGS = -I. -DGMP -DSKIP_MAIN
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) -lgmpxx -lgmp
</code></pre>

<p>As you can see, additional libraries are specified in <code>PKG_LIBS</code> in this file. The <code>src/Makevars</code> approach assumes that you incorporate C++ code into your project using a standard package layout, as produced by <code>Rcpp.package.skeleton()</code>, with <code>NAMESPACE</code> and <code>DESCRIPTION</code> and so on.</p>

<p>According to Dirk's comments above, there is currently no way to specify an external library when C++ code is incorporated using the <code>sourceCpp</code> function, because that function provides an interface which is supposed to be multi-platform.</p>
How to build a R package which use Rcpp with external c++ libraries?
<p>Such as boost, where can I specify the following: </p>

<pre><code>1.External c++ header file include path 
2.External c++ source file 
3.External c++ link library file path
</code></pre>