RcppArmadillo&ReferenceInputParameter不是模板

发布时间:2022-06-06 / 作者:清心寡欲
本文介绍了RcppArmadillo&;ReferenceInputParameter不是模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个用户包,它已经在我同事的Windows box上构建得很好,它安装了R 2.15.1。我的配置是:

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是包中的源文件之一。

>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

知道发生了什么吗?

感谢您的帮助。 萨奇科

推荐答案

您有最新的RcppArmadillo,它需要最新的RCPP,而您没有(我不会用详细信息让您感到厌烦,但它与CRAN相关)。

从源安装RCPP 0.10.5,应该可以正常工作。

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



[英文标题]RcppArmadillo "ReferenceInputParameter is not a template"


声明:本媒体部分图片、文章来源于网络,版权归原作者所有,如有侵权,请联系QQ:330946442删除。