[Rcpp-devel] Using GSL in R with Rcpp

Petre Caraiani petre.caraiani at gmail.com
Wed Apr 2 13:26:34 CEST 2014


It seems that I am able to run the example in RcppGSL-intro.pdf, section 6,
as far as I use the 32 bits R version.
So, should I just use cxxfunction, or is there another way to make
sourceCpp work for me too?
Thanks!


On Wed, Apr 2, 2014 at 11:14 AM, Petre Caraiani <petre.caraiani at gmail.com>wrote:

> Hello!
> I am trying to run the example here:
> http://gallery.rcpp.org/articles/gsl-colnorm-example/
>
> I get the following error:
>
> g++ -m64 -I"C:/R/R-30~1.3/include" -DNDEBUG -IC:/GSl-1.16/include     -I"E:/Users/peter/Documents/R/win-library/3.0/Rcpp/include"
> -I"E:/Users/peter/Documents/R/win-library/3.0/RcppGSL/include"
> -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall  -mtune=core2
> -c test.cpp -o test.o
>
>
>
> test.cpp:8:1: error: 'Rcpp' does not name a type
>
>
>
> test.cpp: In function 'SEXPREC* sourceCpp_84035_colNorm(SEXP)':
>
>
>
> test.cpp:31:50: error: 'colNorm' was not declared in this scope
>
>
>
> make: *** [test.o] Error 1
>
>
>
> Warning message:
>
>
>
> running command 'make -f "C:/R/R-30~1.3/etc/x64/Makeconf" -f
> "C:/R/R-30~1.3/share/make/winshlib.mk"
> SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)'
> SHLIB="sourceCpp_54336.dll" WIN=64 TCLBIN=64 OBJECTS="test.o"' had status 2
>
>
>
>
>
> Error in sourceCpp("test.cpp") :
>
>   Error 1 occurred building shared library.
>
> I have installed GSL using MINGW. I have also set an environmental
> variable:
> LIB_GSL=C:/GSL-1.16 as well added the following values to PATH:
> C:\GSL-1.16
> C:\GSL-1.16\bin
> C:\GSL-1.16\lib
> C:\GSL-1.16\share
>
> Thanks!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140402/d8969ab5/attachment.html>


More information about the Rcpp-devel mailing list