[Rcpp-devel] Rstudio package build and Rcpp::compileAttributes()
Dale.Smith at Fiserv.com
Thu Feb 7 16:59:39 CET 2013
I'm using Rstudio 0.97.306, R 2.15-2, and Rcpp 0.10.2 with Windows 7
Professional x64. I recently switched to using the build tool in
Rstudio, however, my generated file RcppExports.cpp and RcppExports.R
are checked into version control, so they are read-only. The build fails
Error in eval(expr, envir, enclos) :
file io error:
Calls: source ... withVisible -> eval -> eval -> <Anonymous> -> .Call
I have them checked in as I need to modify RcppExports.cpp manually,
after running compileAttributes(), to avoid compiling in Visual Studio
(see below for explanation, if you are interested):
using namespace Rcpp;
I tried removing the generated key at the top of RcppExports.cpp since
this is mentioned in the Rcpp Attributes Vignette. However, I still have
the error. Perhaps I've misinterpreted section 3.5.2 "Generated Code"?
In order to avoid generating traffic on the list let me comment on why
I'm wrapping RcppExports.cpp with _MSC_VER. My employer produces all
applications and libraries in Visual Studio. I wrap my ANSI C++ classes
with .NET managed C++ classes and build a .NET assembly. This allows me
to use Rcpp to test my C++ implementations of models against a clean
implementation in R and fulfill company requirements that I use Visual
Studio unit tests for quality assurance. I can then deliver the assembly
build to developers for use in their own projects.
I may turn the previous paragraph into a presentation for the Atlanta R
Dale Smith, Ph.D.
Senior Financial Quantitative Analyst
Risk & Compliance
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rcpp-devel