Dear All,
I have install rstan recently under windows 10 and R version 3.6.1. I have a problem in compiling and I always have the following:
DIAGNOSTIC(S) FROM PARSER:
Info: Comments beginning with # are deprecated. Please use // in place of # for line comments.
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! Error in .shlib_internal(commandArgs(TRUE)) :
C++14 standard requested but CXX14 is not defined
Calls: -> .shlib_internal
Execution halted
In addition: Warning message:
In system(cmd, intern = !verbose) :
running command ‘C:/PROGRA~1/R/R-36~1.1/bin/x64/R CMD SHLIB file21c2f477968.cpp 2> file21c2f477968.cpp.err.txt’ had status 1
Error in sink(type = “output”) : invalid connection
I have read many discussions but none of them were helpful in overcoming my issue, it would be appreciated if anyone can help me.
Thanks
Also, when applying:
fx <- inline::cxxfunction( signature(x = “integer”, y = “numeric” ) , ’
return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
’ )
I have the following:
Warning message:
In system(cmd) : ‘make’ not found
ERROR(s) during compilation: source code errors or compiler configuration errors!
Program source:
1:
2: // includes from the plugin
3: #include <R.h>
4: #include <Rdefines.h>
5: #include <R_ext/Error.h>
6:
7:
8: // user includes
9:
10:
11: // declarations
12: extern “C” {
13: SEXP file21c13ff2de9( SEXP x, SEXP y) ;
14: }
15:
16: // definition
17:
18: SEXP file21c13ff2de9( SEXP x, SEXP y ){
19:
20: return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
21:
22: Rf_warning(“your C++ program does not return anything”);
23: return R_NilValue ;
24: }
25:
26:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! Warning message:
In system(cmd) : ‘make’ not found
In addition: Warning message:
In system(cmd, intern = !verbose) :
running command ‘C:/PROGRA~1/R/R-36~1.1/bin/x64/R CMD SHLIB file21c13ff2de9.cpp 2> file21c13ff2de9.cpp.err.txt’ had status 1
Hmm, not having make
makes me think there’s a bigger problem, but the first error looks similar to this: https://github.com/stan-dev/rstan/issues/569
There might be something wrong with the compiler toolchain, though. Did you install Rtools like here: https://github.com/stan-dev/rstan/wiki/Installing-RStan-from-source-on-Windows ?