Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/150.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
与<;标题h>;使用Rcpp时 我试图在C++程序中使用R函数。我从下载了文件Rcpp_0.11.5.tar.gz,将其解压缩,并将include目录添加到我的IDE中(我使用的是Dev-C++V5.4.2)。首先,我尝试了以下方法(只是为了检查它是否正常): #包括 #包括 int main(int argc,字符**argv){ 返回0; }_C++_R_Rcpp - Fatal编程技术网

与<;标题h>;使用Rcpp时 我试图在C++程序中使用R函数。我从下载了文件Rcpp_0.11.5.tar.gz,将其解压缩,并将include目录添加到我的IDE中(我使用的是Dev-C++V5.4.2)。首先,我尝试了以下方法(只是为了检查它是否正常): #包括 #包括 int main(int argc,字符**argv){ 返回0; }

与<;标题h>;使用Rcpp时 我试图在C++程序中使用R函数。我从下载了文件Rcpp_0.11.5.tar.gz,将其解压缩,并将include目录添加到我的IDE中(我使用的是Dev-C++V5.4.2)。首先,我尝试了以下方法(只是为了检查它是否正常): #包括 #包括 int main(int argc,字符**argv){ 返回0; },c++,r,rcpp,C++,R,Rcpp,在编译过程中,我遇到了以下错误: C:\R\Rcpp\inst\include\Rcpp\R\headers.h[错误]R.h:没有这样的文件或目录 C:\R\Rcpp\inst\include\RcppCommon.h在C:/Users/Gerson/Desktop/My Stuff/R/Rcpp/inst/include/RcppCommon.h中包含的文件中 检查文件RcppCommon.h时,我在第48行中发现: #include <R.h> #包括 但是在我解压缩的包

在编译过程中,我遇到了以下错误:

C:\R\Rcpp\inst\include\Rcpp\R\headers.h[错误]R.h:没有这样的文件或目录

C:\R\Rcpp\inst\include\RcppCommon.h在C:/Users/Gerson/Desktop/My Stuff/R/Rcpp/inst/include/RcppCommon.h中包含的文件中

检查文件RcppCommon.h时,我在第48行中发现:

 #include <R.h>
#包括
但是在我解压缩的包中没有这样的文件。进一步看,我发现了其他指向包中没有的文件的“include”指令。一些例子:

#include <R_ext/Complex.h>
#include <R_ext/Parse.h>
#include <R_ext/Rdynload.h>
#包括
#包括
#包括
我做错了什么

Thks


GB

它被称为Rcpp。但从您的设置中,您需要的是。
#include <R_ext/Complex.h>
#include <R_ext/Parse.h>
#include <R_ext/Rdynload.h>