I would like to compile .cpp code based on RcppEigen using R CMD SHLIB. 

To test this I have created a "sample" package using: 
RcppEigen.package.skeleton( "foobar" )

In the src directory of foobar there is a sample .cpp file which I try to 
compile with (I am on Windows 7)

C:\Documents\stat\Rdevel\gRbaseDEVEL\foobar\src>R CMD SHLIB 
rcppeigen_hello_world.cpp
g++ -m64 -I"C:/programs/R/current/include" -DNDEBUG     
-I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
 -mtune=core2 -c rcppeigen_hello_world.cpp -o rcppeigen_hello_world.o
In file included from rcppeigen_hello_world.cpp:1:0:
rcppeigen_hello_world.h:4:23: fatal error: RcppEigen.h: No such file or 
directory
compilation terminated.
make: *** [rcppeigen_hello_world.o] Error 1

The automatically created Makevars.win file contains the line:
PKG_LIBS = $(shell $(R_HOME)/bin/Rscript.exe -e "Rcpp:::LdFlags()")
- and this does not seem to catch RcppEigen.h which is in /library/RcppEigen. 

Question: Can anyone tell what should be written in the Makevars to be able to 
compile using R CMD SHLIB ??
Thanks in advance.

Best regards
Søren

_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to