<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style>body { line-height: 1.5; }body { font-size: 10.5pt; font-family: ????; color: rgb(0, 0, 0); line-height: 1.5; }body { font-size: 10.5pt; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span><span style="background-color: rgba(0, 0, 0, 0);">Hi,
<br>
<br>Recently I am trying to use GSL for improving my code and I found RcppGSL is really great. BUT I am stuck by configuring it for a few days. What I've done is as:
<br>
<br>1. Install Rcpp and RcppGSL;
<br>2. Download "local320.zip" file and unzipped it as "LIB_GSL"
<br>3. Add an environment variable LIB_GSL, and make it as "D:/LIB_GSL"
<br>4. Edit the "Makevars.win" as follows:
<br>
<br>PKG_CPPFLAGS=-I$(LIB_GSL)/include -I../inst/include
<br>PKG_LIBS=-L$(LIB_GSL)/lib/x64 -lgsl -lgslcblas $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()")
<br>
<br>Then I started to run the example code:
<br>
<br>> sourceCpp("bSpline.cpp") 
<br>
<br>I got the following errors:
<br>
<br>g++ -m64 -I"D:/PROGRA~1/R/R-31~1.1/include" -DNDEBUG -ID:/LIB_GSL/include -ID:/LIB_GSL/include -I../inst/include    -I"D:/PROGRA~1/R/R-31~1.1/library/Rcpp/include" -I"D:/PROGRA~1/R/R-31~1.1/library/RcppGSL/include" -I"E:/Dropbox/Paper/HIGHPE~1/packages/RcppGSL/inst/examples/bSpline"  -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall  -mtune=core2 -c bSpline.cpp -o bSpline.o
<br>g++ -m64 -shared -s -static-libgcc -o sourceCpp_1.dll tmp.def bSpline.o -LD:/LIB_GSL/lib -lgsl -lgslcblas -LD:/PROGRA~1/R/R-31~1.1/bin/x64 -lRlapack -LD:/PROGRA~1/R/R-31~1.1/bin/x64 -lRblas -lgfortran -LD:/LIB_GSL/lib -lgsl -lgslcblas -Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LD:/PROGRA~1/R/R-31~1.1/bin/x64 -lR
<br>d:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lgsl
<br>d:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lgslcblas
<br>d:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lgsl
<br>d:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lgslcblas
<br>collect2: ld returned 1 exit status
<br>
<br>I've no idea what happened. Did I miss anything or do something wrongly? Many thanks!
<br>
<br>Best regards,
<br>
<br>Binbin <br></span></div>
<div><br></div>
</body></html>