[Rcpp-devel] question re: LdFlags, RcppLdFlags

Dirk Eddelbuettel edd at debian.org
Tue Oct 8 23:53:13 CEST 2013

On 8 October 2013 at 14:46, Kevin Ushey wrote:
| Hi,
| In previous versions of Rcpp, we typically constructed the PKG_LIBS variable in
| Makevars through
|     PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`
| This is also what's done in e.g. Rcpp.package.skeleton. However, following the
| new guidelines from CRAN, RcppLdFlags was exported, but not LdFlags. I wonder

Darn.  Error on my part.  It should have been LdFlags.  That was the intent.
Oh well.

I didn't get bitten by it myself as CRAN as the stupid exception rule "if in
package of some maintainer" or else I would have noticed when preparing

| if the intention was to export LdFlags as well, so that we can simply omit one
| colon from the LdFlags call:
|     PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp::LdFlags()"`
| As is, because RcppLdFlags was exported and returns its result invisibly, it's
| required to write e.g.
|     PKG_LIBS = `$(R_HOME)/bin/Rscript -e "cat(Rcpp::RcppLdFlags())"`
| which is a bit uglier. 

We had variants like that in the earlier which is part of the reason the
particular R file has several such functions.

Only LdFlags() should be used, but until the next release we are stuck with a
typo / think.

| Can we have LdFlags exported in addition to RcppLdFlags? It would also help
| keep everything consistent with the available documentation.

I'll do that right now in SVN.

Thanks for the report.


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

More information about the Rcpp-devel mailing list