[Rcpp-devel] question re: LdFlags, RcppLdFlags

Dirk Eddelbuettel edd at debian.org
Thu Oct 10 00:14:55 CEST 2013


On 10 October 2013 at 00:05, Romain Francois wrote:
| That will then quickly become a mess. Having the convention 
| package:::LdFlags() was fine.

I agree. It was a perfectly legit use of ::: but then the powers of CRAN do
other things do we don't agree with but cannot easily alter.
 
| Or perhaps we could centralize within Rcpp, i.e. have something like:
| 
| PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp::LdFlags('foo')"`
| 
| and we would just have to leverage the inline plugin for package "foo' 
| there.

That's pretty.  For all the Rcpp-using package, we can assume Rcpp to be
there so it may as well pivot over and call a plugin from 'foo'. 

| > So from the Rcpp side we have little choice but to export LdFlags() as others are
| > calling it, and R CMD check now complains about the use -- unless it is exported.
| 
| Sure.

The other immediate defensive way would be to use NAMESPACE etc on the client
package and not load Rcpp and Rcpp$foo but just importFrom() etc what is needed.
 
Dirk 

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list