[Rcpp-devel] Compiling RcppArmadillo through R CMD SHLIB on Windows XP

Savitsky, Terrance savitsky at rand.org
Sun Dec 12 04:03:47 CET 2010


Hello, 

 

I employ a variant of the following lines in a cygwin bash session in
Windows XP to compile my .cpp file.

 

$ export PKG_LIBS=`Rscript.exe -e "RcppArmadillo:::LdFlags()"`

$ export PKG_CXXFLAGS=`Rscript.exe -e "RcppArmadillo:::CxxFlags()"`

$ R CMD SHLIB fastLm.cpp

 

I receive the following compile error:

 

G++ -I"C:/PROGRA~1/R/R-212~1.0/include" Rscript.exe -e
"RcppArmadillo:::CxxxFlags()" -O2 - Wall -pedantic - c fastLm.cpp - o
fastLm.o 

 

G++:Rscript.exe: No such file or directory

fastLm.cpp:1:27: error: RcppArmadillo.h: No such file or directory

fastLm.cpp:2: error: 'SEXP' does not have name a type

 

I've included the R bin directory containing Rscript.exe to the PATH
environment statement.   Should one use a different syntax for windows
to capture RcppArmadillo dependencies?  (Fyi, I am able to build using
inline, though my code is 600 lines and I will have multiple versions,
so using the old approach may provide the most modular de-bugging
approach vs. re-installing a package as I add files).

 

Thanks, Terrance Savitsky

 


__________________________________________________________________________

This email message is for the sole use of the intended recipient(s) and
may contain confidential information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20101211/ec1136ac/attachment.htm>


More information about the Rcpp-devel mailing list