我已经在 R-Studio 中使用 Rcpp 成功构建了自己的包。但是,在 Windows 控制台中构建包时,有一些错误消息抱怨文件丢失R.h
.
我设置path
和R_Home
环境
SET PATH=D:\RTools\gcc-4.6.3\bin;D:\R3\bin;D:\RTools\bin;
SET R_HOME=D:\R3\
构建命令是
R CMD INSTALL --byte-compile --build mypkg
以下是编译错误消息:
g++ -m32 -I"/include" -DNDEBUG -I"D:/R3/library/Rcpp/include" -I"d:
/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c Rcpp
Exports.cpp -o RcppExports.o
In file included from D:/R3/library/Rcpp/include/Rcpp.h:27:0,
from RcppExports.cpp:4:
D:/R3/library/Rcpp/include/RcppCommon.h:35:15: fatal error: R.h: No su
ch file or directory
compilation terminated.