<div dir="ltr">Thanks.<div><br></div><div>I think, I messed up with the setting of the environment variable...due to the following new error message:<div><br></div><div><div><font face="monospace">g++ -m64 -I"C:/PROGRA~1/R/R-31~1.1/include" -DNDEBUG -IC:\Program Files (x86)\CodeLibraries/include     -I"C:/PROGRA~1/R/R-31~1.1/library/Rcpp/include" -I"C:/PROGRA~1/R/R-31~1.1/library/RcppGSL/include"  -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall  -mtune=core2 -c colNorm.cpp -o colNorm.o</font></div><div><font face="monospace">Syntax error: "(" unexpected</font></div><div><font face="monospace">make: *** [colNorm.o] Error 2</font></div><div><font face="monospace">Warning message:</font></div><div><font face="monospace">running command 'make -f "C:/PROGRA~1/R/R-31~1.1/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-31~1.1/share/make/<a href="http://winshlib.mk">winshlib.mk</a>" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="sourceCpp_32194.dll" WIN=64 TCLBIN=64 OBJECTS="colNorm.o"' had status 2 </font></div></div><div><br></div><div><br></div><div>I assume this error is caused by the missing quotation mark around  <span style="font-family:monospace">C:\Program Files (x86)\CodeLibraries/include. </span><font face="arial, helvetica, sans-serif">The path I used for </font><font face="monospace">LIB_GSL</font><font face="arial, helvetica, sans-serif"> was </font><span style="font-family:monospace">C:\Program Files (x86)\CodeLibraries</span><font face="arial, helvetica, sans-serif">.</font><span style="font-family:monospace"> </span><font face="arial, helvetica, sans-serif">I tried to fix by adjusting the environment variable and reinstalled RcppGSL package, but the same error consists. Even after removing the environment variable, RcppGSL still searches at this particular place, which is obviously the place the compiler is expecting the GSL library.</font></div></div><div><span style="font-family:monospace"><br></span></div><div><font face="arial, helvetica, sans-serif">Where does the g++ compiler take that information from? How I can adjust for that second location?</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Regards</font></div><div><font face="arial, helvetica, sans-serif">Devin</font></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 13, 2014 at 2:47 AM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On 12 November 2014 at 18:08, Devin Heer wrote:<br>
| Thanks for your quick reply!<br>
|<br>
| Indeed, the file you described within RcppGSL\examples\RcppGSLExample\src looks<br>
| as follows:<br>
|<br>
| ## This assumes that the LIB_GSL variable points to working GSL libraries<br>
| PKG_CPPFLAGS=-I$(LIB_GSL)/include<br>
| PKG_LIBS=-L$(LIB_GSL)/lib -lgsl -lgslcblas<br>
|<br>
|<br>
| I can now simply replace LIB_GSL by the path where my GSL folder is located?<br>
<br>
</span>Sure. The better way, though, is to the set the environment variable to the<br>
value of the directory. That way the portable code remains valid, and next<br>
you time you upgrade/build it still works.<br>
<br>
See any of the many fine tutorials on the web on how to set an environment<br>
variable.<br>
<span class=""><br>
| And when I define a new function (outside RcppGSLExample), which Makevars.win<br>
| file is then queried? (since there is also a makevars.win file in RcppGSL\<br>
| skeleton; I should update this as well?)<br>
<br>
</span>Always the one in the src/ directory of the package you are building.<br>
<span class="HOEnZb"><font color="#888888"><br>
Dirk<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
| Thanks<br>
|<br>
| On Wed, Nov 12, 2014 at 3:32 PM, Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>> wrote:<br>
|<br>
|<br>
|     Hi Devin,<br>
|<br>
|     On 12 November 2014 at 15:13, Devin Heer wrote:<br>
|     | Thus, I would really like to get the RcppGSL package up and running. I<br>
|     have<br>
|     | downloaded the GSL library and saved it in the same folder where the<br>
|     header<br>
|     | file Rcpp.h is located (I assume this is the default place RcppGSL is<br>
|     looking<br>
|     | for header- and source files). <br>
|<br>
|     Nope. See below.<br>
|<br>
|     | For test purposes, I try to compile the following (copied from<br>
|     r-bloggers):<br>
|<br>
|     [...]<br>
|<br>
|     | c:/rbuildtools/3.1/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../..<br>
|     /../../<br>
|     | i686-w64-mingw32/bin/ld.exe: cannot find -lgsl<br>
|       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br>
|<br>
|     You need to communicate to your systeh where GSL is.<br>
|<br>
|     Linux and OS X do that by querying the gsl-config script.<br>
|<br>
|     Windows does that by querying the environment variable LIB_GSL, see src/<br>
|     Makevars.win<br>
|     and this comment:<br>
|<br>
|        ## This assumes that the LIB_GSL variable points to working GSL<br>
|     libraries<br>
|<br>
|     The RcppGSL package comes with its test package examples/RcppGSLExample --<br>
|     I<br>
|     would recommend trying to build that first.<br>
|<br>
|     Dirk<br>
|<br>
|     --<br>
|     <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a><br>
|<br>
|<br>
<br>
--<br>
<a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a><br>
</div></div></blockquote></div><br></div></div>