Skip to Content

Rcpp compile error

I am trying to run a test function but I am getting a compile error:

testfun = cxxfunction(  
signature(x="numeric", i="integer"),  
body = '  
NumericVector xx(x);    
int ii = as<int>(i);  
xx = xx * ii;  
return( xx );  
', plugin="Rcpp")  
testfun(1:5, 3)  

Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created!
In addition: Warning message:
running command 'C:/PROGRA~1/R/R-215~1.1/bin/x64/R CMD SHLIB filede44a566900.cpp 2> filede44a566900.cpp.err.txt' had status 1

I would be grateful for your help. I am using windows 7, R2.15.1, 64 bit