我正在尝试在工作中设置RInside,我们被迫使用Windows环境。
我已经安装了RTools并从CRAN下载了一个RInside二进制文件。
我的R安装位于c:\R\R-2.12.2,因此不会出现带空格的文件夹问题。
我已经在R中安装了Rcpp和RInside软件包。
我执行了下载的RInside二进制文件中包含的Makefile.win。
我已经安装了RTools并从CRAN下载了一个RInside二进制文件。
我的R安装位于c:\R\R-2.12.2,因此不会出现带空格的文件夹问题。
我已经在R中安装了Rcpp和RInside软件包。
我执行了下载的RInside二进制文件中包含的Makefile.win。
## -*- mode: makefile; tab-width: 8; -*-
##
## Simple Makefile
##
## TODO:
## proper configure for non-Debian file locations, [ Done ]
## allow RHOME to be set for non-default R etc
## comment this out if you need a different version of R,
## and set set R_HOME accordingly as an environment variable
R_HOME := 'cygdrive/c/R/R-2.12.2'
sources := $(wildcard *.cpp)
programs := $(sources:.cpp=)
## include headers and libraries for R
RCPPFLAGS := $(shell $(R_HOME)/bin/R CMD config --cppflags)
RLDFLAGS := $(shell $(R_HOME)/bin/R CMD config --ldflags)
RBLAS := $(shell $(R_HOME)/bin/R CMD config BLAS_LIBS)
RLAPACK := $(shell $(R_HOME)/bin/R CMD config LAPACK_LIBS)
## include headers and libraries for Rcpp interface classes
RCPPINCL := $(shell echo 'Rcpp:::CxxFlags()' | $(R_HOME)/bin/R --vanilla -- slave)
RCPPLIBS := $(shell echo 'Rcpp:::LdFlags()' | $(R_HOME)/bin/R --vanilla --slave)
## include headers and libraries for RInside embedding classes
RINSIDEINCL := $(shell echo 'RInside:::CxxFlags()' | $(R_HOME)/bin/R --vanilla --slave)
RINSIDELIBS := $(shell echo 'RInside:::LdFlags()' | $(R_HOME)/bin/R --vanilla --slave)
## compiler etc settings used in default make rules
CXX := $(shell $(R_HOME)/bin/R CMD config CXX)
CPPFLAGS := -Wall $(shell $(R_HOME)/bin/R CMD config CPPFLAGS)
CXXFLAGS := $(RCPPFLAGS) $(RCPPINCL) $(RINSIDEINCL) $(shell $(R_HOME)/bin/R CMD config CXXFLAGS)
LDFLAGS = -s
LDLIBS := $(RLDFLAGS) $(RBLAS) $(RLAPACK) $(RINSIDELIBS) $(RCPPLIBS)
CC := $(shell $(R_HOME)/bin/R CMD config CXX)
all : $(programs)
clean:
rm -vf $(programs)
使用该命令
make -f Makefile.win
我想尝试构建包含在标准示例中的内容。
但是,我遇到了以下错误:
C:\RInside_0.2.3\RInside\examples\standard>make -f Makefile.win
make: cygdrive/c/R/R-2.12.2/bin/R: Command not found
make: cygdrive/c/R/R-2.12.2/bin/R: Command not found
make: cygdrive/c/R/R-2.12.2/bin/R: Command not found
make: cygdrive/c/R/R-2.12.2/bin/R: Command not found
cygdrive/c/R/R-2.12.2/bin/R: not found
cygdrive/c/R/R-2.12.2/bin/R: not found
cygdrive/c/R/R-2.12.2/bin/R: not found
cygdrive/c/R/R-2.12.2/bin/R: not found
make: cygdrive/c/R/R-2.12.2/bin/R: Command not found
make: cygdrive/c/R/R-2.12.2/bin/R: Command not found
make: cygdrive/c/R/R-2.12.2/bin/R: Command not found
make: cygdrive/c/R/R-2.12.2/bin/R: Command not found
Wall -s rinside_callbacks0.cpp -o rinside_callbacks0
make: Wall: Command not found
make: [rinside_callbacks0] Error 127 (ignored)
Wall -s rinside_module_sample0.cpp -o rinside_module_sample0
make: Wall: Command not found
make: [rinside_module_sample0] Error 127 (ignored)
Wall -s rinside_sample0.cpp -o rinside_sample0
make: Wall: Command not found
make: [rinside_sample0] Error 127 (ignored)
Wall -s rinside_sample1.cpp -o rinside_sample1
make: Wall: Command not found
make: [rinside_sample1] Error 127 (ignored)
Wall -s rinside_sample2.cpp -o rinside_sample2
make: Wall: Command not found
make: [rinside_sample2] Error 127 (ignored)
Wall -s rinside_sample3.cpp -o rinside_sample3
make: Wall: Command not found
make: [rinside_sample3] Error 127 (ignored)
Wall -s rinside_sample4.cpp -o rinside_sample4
make: Wall: Command not found
make: [rinside_sample4] Error 127 (ignored)
Wall -s rinside_sample5.cpp -o rinside_sample5
make: Wall: Command not found
make: [rinside_sample5] Error 127 (ignored)
Wall -s rinside_sample6.cpp -o rinside_sample6
make: Wall: Command not found
make: [rinside_sample6] Error 127 (ignored)
Wall -s rinside_sample7.cpp -o rinside_sample7
make: Wall: Command not found
make: [rinside_sample7] Error 127 (ignored)
Wall -s rinside_sample8.cpp -o rinside_sample8
make: Wall: Command not found
make: [rinside_sample8] Error 127 (ignored)
Wall -s rinside_sample9.cpp -o rinside_sample9
make: Wall: Command not found
make: [rinside_sample9] Error 127 (ignored)
Wall -s rinside_test0.cpp -o rinside_test0
make: Wall: Command not found
make: [rinside_test0] Error 127 (ignored)
Wall -s rinside_test1.cpp -o rinside_test1
make: Wall: Command not found
make: [rinside_test1] Error 127 (ignored)
我已经尝试了不同的路径来设置R_HOME,但我怀疑自己是否找到了正确的路径。我对makefile还很陌生,因此错误输出对我帮助不大。
希望有人能分享一些有价值的见解!
提前感谢,
Christian