[Rcpp-devel] Some suggestions
Romain Francois
romain at r-enthusiasts.com
Sun Jul 11 18:06:48 CEST 2010
Le 11/07/10 17:51, Dominick Samperi a écrit :
> On Sun, Jul 11, 2010 at 4:58 AM, Romain Francois
> <romain at r-enthusiasts.com <mailto:romain at r-enthusiasts.com>> wrote:Le
> 11/07/10 02:14, Dominick Samperi a écrit :
>
> Romain,
>
> I made two small changes that should have no impact at all since
> they only
> apply when you build using windows DLL's (not static libs).
> Obviously these
> are not tested by a win-builder submission.
>
>
> Why not.
>
>
> Because testing this would require PATH to be changed at CRAN to include
> the directory containing Rcpp.dll, and this must be done BEFORE the package
> build or check process. This would have to be done using a Windows batch
> file as part of the initialization. Doing it in configure.win will not
> work. Also,
> a real test would require another package (like cxxPack) that links against
> Rcpp dynamically.
As I said, check the runit.client.package.R test that does exactly this:
checking that a client package works.
We do test that documented ways to include Rcpp headers and link against
the user libraries work.
While on the subject, the current best way to pull header files in is to
use LinkingTo: Rcpp and not:
PKG_CPPFLAGS = $(shell $(R_HOME)/bin/Rscript --vanilla -e
"Rcpp:::CxxFlags()")
which is what several packages are still using, including cxxPack.
This at least makes one less use of $shell/Rscript, which apparently is
the bad guy.
> Without this update to PATH every use of Rscript would have to
> explictly load the client package like this:
>
> Rscript --vanilla -e "{ library(cxxPack); cxxPack:::LdFlags() }"
>
> For this reason it appears that static libs need to be used for packages
> submitted to CRAN, unless some way is provided to update CRAN's
> windows-level search path.
>
> Perhaps the LinkTo: mechanism can be modified to take care of this
> special processing under Windows?
>
> On your comments about switching to configure.in <http://configure.in>,
> etc., recall that
> there is no configure under Windows (just configure.win).
Sure.
> Dominick
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://bit.ly/bc8jNi : Rcpp 0.8.4
|- http://bit.ly/dz0RlX : bibtex 0.2-1
`- http://bit.ly/a5CK2h : Les estivales 2010
More information about the Rcpp-devel
mailing list