[Rcpp-devel] Rcpp::depends not picking up inst/include/

JJ Allaire jj.allaire at gmail.com
Fri Nov 30 19:28:28 CET 2012

> Looking through the source of ./pkg/Rcpp/R/Attributes.R contains it seems
> that a depended upon package _must_ define a plugin if the inst/include is
> to get appended to the sourced files build environment.

We do indeed add inst/include to the compilation for all packages listed in
Rcpp::depends (Attributes.R:371 adds the package name to the list then the
call to .buildClinkCppFlags on line 419 does the work of locating the
actual directory.

> My use case is that of a header only package providing
> Rcpp::interface(cpp) only where my package DESCRIPTION already contains the
> depends providing everything outside of the wrap and as forwarders. So
> while building the package does require makevars(.win) info the sourceCPP
> source code doesn't because sourceCPP does that for the user.

A hint as to what might be happening is in your reference to as and wrap
forwarders. Are there as and wrap forwarders that are sitting in another
include file? If you want to automatically inject additional include files
(e.g. for as and wrap) then you definitely need to define an inline plugin.

If we can't get to the bottom of this by discussion perhaps you could send
a link to either your source code or a representative example and I'll take
a closer look.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20121130/f8279566/attachment.html>

More information about the Rcpp-devel mailing list