<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }body { font-size: 10.5pt; font-family: ????; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Hi Dirk,</div><div><br></div><div>Many thanks. It's working now.</div><div><br></div><div>It could not find the two libraries because they were not exactly under the folder "../lib" but in the next level "../lib/x64" or "../lib/i386", which are the original structure  from "<span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">local320.zip</span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">". I moved all the files from "../lib/x64" to "../lib", and it's working now.</span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><br></span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">Best regards,</span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><br></span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">Binbin</span></div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>Dr Binbin Lu</div><div>Lecturer in School of Remote Sensing and Information Engineering, Wuhan University</div><div><span style="font-size: 10pt; line-height: 1.5; background-color: window;">Email: binbinlu@whu.edu.cn</span></div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:edd@debian.org">Dirk Eddelbuettel</a></div><div><b>Date:</b> 2015-10-14 15:14</div><div><b>To:</b> <a href="mailto:binbinlu@whu.edu.cn">binbinlu\@whu.edu.cn</a></div><div><b>CC:</b> <a href="mailto:rcpp-devel@lists.r-forge.r-project.org">rcpp-devel</a></div><div><b>Subject:</b> Re: [Rcpp-devel] Problems with installing RcppGSL</div></div></div><div><div> </div>
<div>There is a chance you may be confused.</div>
<div> </div>
<div>On 14 October 2015 at 14:18, binbinlu@whu.edu.cn wrote:</div>
<div>| Hi,</div>
<div>| </div>
<div>| Recently I am trying to use GSL for improving my code and I found RcppGSL is</div>
<div>| really great. BUT I am stuck by configuring it for a few days. What I've done</div>
<div>| is as:</div>
<div>| </div>
<div>| 1. Install Rcpp and RcppGSL;</div>
<div>| 2. Download "local320.zip" file and unzipped it as "LIB_GSL"</div>
<div> </div>
<div>You don't "unzip it as 'LIB_GSL'. You can ubzip it anywhere. Say you use </div>
<div>c:/libs/gsl/ -- but then you have to set the _environment variable_ named</div>
<div>LIB_GSL to the _value_ of the location you used, eg c:/lib/gsl</div>
<div> </div>
<div>| 3. Add an environment variable LIB_GSL, and make it as "D:/LIB_GSL"</div>
<div>| 4. Edit the "Makevars.win" as follows:</div>
<div>| </div>
<div>| PKG_CPPFLAGS=-I$(LIB_GSL)/include -I../inst/include</div>
<div>| PKG_LIBS=-L$(LIB_GSL)/lib/x64 -lgsl -lgslcblas $(shell "${R_HOME}/bin$</div>
<div>| {R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()")</div>
<div> </div>
<div>What did you edit? Why did you think you needed to edit?</div>
<div>| </div>
<div>| Then I started to run the example code:</div>
<div>| </div>
<div>| > sourceCpp("bSpline.cpp")</div>
<div>| </div>
<div>| I got the following errors:</div>
<div>| </div>
<div>| g++ -m64 -I"D:/PROGRA~1/R/R-31~1.1/include" -DNDEBUG -ID:/LIB_GSL/include -ID:/</div>
<div>| LIB_GSL/include -I../inst/include -I"D:/PROGRA~1/R/R-31~1.1/library/Rcpp/</div>
<div>| include" -I"D:/PROGRA~1/R/R-31~1.1/library/RcppGSL/include" -I"E:/Dropbox/Paper</div>
<div>| /HIGHPE~1/packages/RcppGSL/inst/examples/bSpline" -I"d:/RCompile/CRANpkg/</div>
<div>| extralibs64/local/include" -O2 -Wall -mtune=core2 -c bSpline.cpp -o bSpline.o</div>
<div>| g++ -m64 -shared -s -static-libgcc -o sourceCpp_1.dll tmp.def bSpline.o -LD:/</div>
<div>| LIB_GSL/lib -lgsl -lgslcblas -LD:/PROGRA~1/R/R-31~1.1/bin/x64 -lRlapack -LD:/</div>
<div>| PROGRA~1/R/R-31~1.1/bin/x64 -lRblas -lgfortran -LD:/LIB_GSL/lib -lgsl</div>
<div>| -lgslcblas -Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64 -Ld:/RCompile/</div>
<div>| CRANpkg/extralibs64/local/lib -LD:/PROGRA~1/R/R-31~1.1/bin/x64 -lR</div>
<div>| d:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../</div>
<div>| i686-w64-mingw32/bin/ld.exe: cannot find -lgsl</div>
<div>| d:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../</div>
<div>| i686-w64-mingw32/bin/ld.exe: cannot find -lgslcblas</div>
<div>| d:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../</div>
<div>| i686-w64-mingw32/bin/ld.exe: cannot find -lgsl</div>
<div>| d:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../</div>
<div>| i686-w64-mingw32/bin/ld.exe: cannot find -lgslcblas</div>
<div>| collect2: ld returned 1 exit status</div>
<div>| </div>
<div>| I've no idea what happened. Did I miss anything or do something wrongly? Many</div>
<div>| thanks!</div>
<div> </div>
<div>It seems to have found the headers (or else it would not have compiled) but</div>
<div>not the library.  Check D:/LIB_GSL/lib/ and see if it has the missing</div>
<div>libraries libgsl and libgslcblas.</div>
<div> </div>
<div>All this is used the same way at CRAN so it works there....</div>
<div> </div>
<div>Dirk</div>
<div> </div>
<div>| </div>
<div>| Best regards,</div>
<div>| </div>
<div>| Binbin </div>
<div>| </div>
<div>| _______________________________________________</div>
<div>| Rcpp-devel mailing list</div>
<div>| Rcpp-devel@lists.r-forge.r-project.org</div>
<div>| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</div>
<div> </div>
<div>-- </div>
<div>http://dirk.eddelbuettel.com | @eddelbuettel | edd@debian.org</div>
</div></blockquote>
</body></html>