本文介绍了RcppArmadillo“ReferenceInputParameter不是模板”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立一个用户包,已经在我的同事的窗口框已经建好,安装了R 2.15.1。我的配置是:

I am trying to build a user package that has been building fine on my colleague's windows box which has R 2.15.1 installed. My config is:

R 2.15.3,RTools 3.0,Rcpp 0.10.4,RcppArmadillo 0.3.920.1,RStudio 0.97.551

R 2.15.3, RTools 3.0, Rcpp 0.10.4, RcppArmadillo 0.3.920.1, RStudio 0.97.551

这是我运行R CMD INSTALL mypackage时的第一个编译实例。 indfunForecast.cpp是软件包中的源文件之一。

This is the first compilation instance when I run "R CMD INSTALL mypackage". indfunForecast.cpp is one of the source files within the package.

>g++ -m32 -I"D:/PROGRA~1/R/R-215~1.3/include" -DNDEBUG
-I"D:/R/win-library/2.15/Rcpp/include" -I"D:/R/win-library/2.15/RcppArmadillo/include" 
-I"d:/RCompile/CRANpkg/extralibs64/local/include" 
-O2 -Wall -mtune=core2 
-c indfunForecast.cpp -o indfunForecast.o

以下错误讯息是:

In file included from D:/R/win-library/2.15/RcppArmadillo/include/RcppArmadillo.h:30:0,
             from indfunForecast.cpp:16:
D:/R/win-library/2.15/RcppArmadillo/include/RcppArmadilloForward.h:99:33: 
error: 'ConstReferenceInputParameter' is not a template
D:/R/win-library/2.15/RcppArmadillo/include/RcppArmadilloForward.h:100:33: 
error: 'ReferenceInputParameter' is not a template
D:/R/win-library/2.15/RcppArmadillo/include/RcppArmadilloForward.h:101:33: 
error: 'ConstInputParameter' is not a template

正在进行

欣赏您的帮助。
Sachko

Appreciate your help.Sachko

推荐答案

你有最新的RcppArmadillo需要最新的Rcpp,

You have the newest RcppArmadillo which needs the newest Rcpp, which you don't have (and I won't bore you with the details, but it is CRAN-related).

从源代码安装Rcpp 0.10.5,并且应该能正常工作。

Install Rcpp 0.10.5 from source, and things should work.

这篇关于RcppArmadillo“ReferenceInputParameter不是模板”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 07:26