[Rcpp-devel] Rcpp 0.10.0

JJ Allaire jj.allaire at gmail.com
Thu Nov 15 02:07:18 CET 2012


>
> 2. If my package already has a namespace named ernm, is an extra one
> wrapped around it, so that extending packages would have to use
> ernm::ernm::bar()?
>

No, the generated header file for a package exports functions within the
package namespace but that doesn't preclude other headers from exporting
other types in the same namespace.

3. Just to be clear… this removes the need to make an inline plug-in
> because you can just use cppFunction(depends="**MyPacakge",…) with no
> additional glue except for the interface statement.


> quite the opposite, // [[Rcpp::depends("myPackage")]] uses the inline
> plugin as a way to gather information about includes, libraries, ... you
> need it.
>

A clarification here: if your package exposes a header-only interface then
Rcpp::depends will take care of adding your package's include directory to
the sourceCpp compilation (but users of course still need to do e.g.
#include <ernm.h>). For this scenario no inline plugin is needed.

However, for cppFunction it's not enough to just add the include path, we
also need the header(s). For that case you should create a simple inline
plugiln (which you can likely create with a one-liner by calling
Rcpp.plugin.maker).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20121114/861b8545/attachment.html>


More information about the Rcpp-devel mailing list