这是问题,我有Rcpp
&已安装inline
。在cppFunction
工作正常后,我尝试了cxxfunction
,但没有效果。有帮助吗?
从此链接中获取的示例(请参阅:http://dirk.eddelbuettel.com/papers/RcppArmadillo.pdf)
g <- cxxfunction(signature(vs="numeric"),
plugin="RcppArmadillo",
body='
arma::vec v = Rcpp::as<arma::vec>(vs);
arma::mat op = v * v.t();
double ip = arma::as_scalar(v.t() * v);
return Rcpp::List::create(Rcpp::Named("outer")=op,
Rcpp::Named("inner")=ip);',
verbose=TRUE
)
我在Windows 7 64位上; R的路径是"C:\Program Files\R\R-3.0.2"
; Rtools:"C:\Rtools"
(3.1版)
我看到这篇文章:Message error 'C:/Program' not found with Rcpp但我仍然感到困惑。我尝试设置verbose=TRUE
:
Compilation argument: \
C:/PROGRA~1/R/R-30~1.2/bin/x64/R CMD SHLIB file6b05c233a.cpp
file6b05c233a.cpp.err.txt g++ -m64 -I"C:/PROGRA~1/R/R-30~1.2/include"\
-DNDEBUG \
-I"C:/Program Files/R/R-3.0.2/library/RcppArmadillo/include" \
-I"C:/Program Files/R/R-3.0.2/library/Rcpp/include" \
-I"d:/RCompile/CRANpkg/extralibs64/local/include" \
-O2 -Wall -mtune=core2 -c file6b05c233a.cpp -o file6b05c233a.o
C:/PROGRA~1/R/R-30~1.2/etc/x64/Makeconf:181: recipe for \
target 'file6b05c233a.o' failed
file6b05c233a.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in