[Rcpp-devel] an error message from RcppArmadillo

Aileen Lin aileenshanhong.lin at gmail.com
Tue Jan 29 00:23:29 CET 2013


Hi there,

I am trying the package of RcppArmadillo. This is the code I copied from
your website. I am not sure what went wrong.

> suppressMessages(require(inline))
> code <- '
+    arma::mat coeff = Rcpp::as<arma::mat>(a);
+    arma::mat errors = Rcpp::as<arma::mat>(e);
+    int m = errors.n_rows; int n = errors.n_cols;
+    arma::mat simdata(m,n);
+    simdata.row(0) = arma::zeros<arma::mat>(1,n);
+    for (int row=1; row<m; row++) {
+      simdata.row(row) = simdata.row(row-1)*trans(coeff)+errors.row(row);
+    }
+    return Rcpp::wrap(simdata);
+  '
>  ## create the compiled function
>  rcppSim <- cxxfunction(signature(a="numeric",e="numeric"),
+                        code,plugin="RcppArmadillo")
"tty" option detected in CYGWIN environment variable.
CYGWIN=tty is no longer supported.  Please remove it from your
CYGWIN environment variable and use a terminal emulator like mintty,
xterm, or rxvt.
cygwin warning:
  MS-DOS style path detected: C:/PROGRA~1/R/R-215~1.2/etc/i386/Makeconf
  Preferred POSIX equivalent is:
/cygdrive/c/PROGRA~1/R/R-215~1.2/etc/i386/Makeconf
  CYGWIN environment variable option "nodosfilewarning" turns off this
warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
/usr/bin/sh: g++: command not found
make: *** [filee245f631629.o] Error 127

ERROR(s) during compilation: source code errors or compiler configuration
errors!

Program source:
  1:
  2: // includes from the plugin
  3: #include <RcppArmadillo.h>
  4: #include <Rcpp.h>
  5:
  6:
  7: #ifndef BEGIN_RCPP
  8: #define BEGIN_RCPP
  9: #endif
 10:
 11: #ifndef END_RCPP
 12: #define END_RCPP
 13: #endif
 14:
 15: using namespace Rcpp;
 16:
 17:
 18: // user includes
 19:
 20:
 21: // declarations
 22: extern "C" {
 23: SEXP filee245f631629( SEXP a, SEXP e) ;
 24: }
 25:
 26: // definition
 27:
 28: SEXP filee245f631629( SEXP a, SEXP e ){
 29: BEGIN_RCPP
 30:
 31:    arma::mat coeff = Rcpp::as<arma::mat>(a);
 32:    arma::mat errors = Rcpp::as<arma::mat>(e);
 33:    int m = errors.n_rows; int n = errors.n_cols;
 34:    arma::mat simdata(m,n);
 35:    simdata.row(0) = arma::zeros<arma::mat>(1,n);
 36:    for (int row=1; row<m; row++) {
 37:      simdata.row(row) =
simdata.row(row-1)*trans(coeff)+errors.row(row);
 38:    }
 39:    return Rcpp::wrap(simdata);
 40:
 41: END_RCPP
 42: }
 43:
 44:
Error in compileCode(f, code, language = language, verbose = verbose) :
  Compilation ERROR, function(s)/method(s) not created! "tty" option
detected in CYGWIN environment variable.
CYGWIN=tty is no longer supported.  Please remove it from your
CYGWIN environment variable and use a terminal emulator like mintty,
xterm, or rxvt.
cygwin warning:
  MS-DOS style path detected: C:/PROGRA~1/R/R-215~1.2/etc/i386/Makeconf
  Preferred POSIX equivalent is:
/cygdrive/c/PROGRA~1/R/R-215~1.2/etc/i386/Makeconf
  CYGWIN environment variable option "nodosfilewarning" turns off this
warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
/usr/bin/sh: g++: command not found
make: *** [filee245f631629.o] Error 127

My inline package is 0.3.10, RcppArmadillo is 0.3.6.1, Rcpp is 0.10.2. I
also installed Rtools216.exe. Please let me know what I did wrongly. Thank
you.

Regards,
Aileen L.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130129/dcf698af/attachment-0001.html>


More information about the Rcpp-devel mailing list