[Rcpp-devel] Configuring GSL headers and library for RcppGSL use on windows

Silkworth,David J. SILKWODJ at airproducts.com
Thu Jul 5 21:42:41 CEST 2012


I can't believe I am the first to say this, but all searches related have come up pretty dry.
I have installed the GSL setup file " Complete package, except sources 	Setup	  6476814 	11 July 2006" from
http://gnuwin32.sourceforge.net/packages/gsl.htm

Rather than the default installation location in C:\Program Files, I installed directly to my root C: directory to avoid the space in the default, non-POSIX, directory.  So, I have brand-new directory called C:\GnuWin32, which contains bin, include and lib folders along with others in familiar fashion.  The GSL Setup program did not create or touch any Windows environment variables (like PATH).

Now I need to teach R how to find this.  (So, it in-turn can let gcc know these things also?)

For this there is some sort of configure script that must be run.

The Vignette says "We may need to find the location of the GSL headers and library, and this done easily from a configure source script which autoconf generates from a configure.in source file such as the following:"
[I will not duplicate this script here.]
"Such a source configure.in gets converted into a script configure by invoking the autoconf program."

I think this autoconf program relates specifically to a Linux environment.  Windows seems to know nothing of the sort.

Then the Vignette continues with:
"
Similarly, the configure.win for windows can be written as:
GSL_CFLAGS=`${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe -e "RcppGSL:::CFlags()"`
GSL_LIBS=`${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe -e "RcppGSL:::LdFlags()"`
RCPP_LDFLAGS=`${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe -e "Rcpp:::LdFlags()"`
sed -e "s|@GSL_LIBS@|${GSL_LIBS}|" n
-e "s|@GSL_CFLAGS@|${GSL_CFLAGS}|" n
-e "s|@RCPP_LDFLAGS@|${RCPP_LDFLAGS}|" n
src/Makevars.in > src/Makevars.win
"

Now, honestly guys, I've mastered a number of tasks so that I can build and check Rcpp and RcppArmadillo packages on both Windows and Linux.  But I am now stumped with what to do with this configure.win file.  Some of us really need hand holding.  Sorry I had to ask.





More information about the Rcpp-devel mailing list