<P> Dear list good morning,<BR> can someone explain why the compiler return me an error when I add the following include <BR>#include <progress.hpp> (without this inclusion the code is compiled in correct way)<BR>(using // [[Rcpp::depends(Rcpp,RcppArmadillo,RcppProgress)]] for dependencies)<BR><BR>the example code (using attributes sourceCpp) :<BR><BR><BR>// [[Rcpp::depends(Rcpp,RcppArmadillo,RcppProgress)]]</P>
<P>#include <RcppArmadillo.h><BR>#include <RcppArmadilloExtensions/sample.h></P>
<P>#include <progress.hpp></P>
<P><BR>// [[Rcpp::export]]</P>
<P>arma::vec Mahalanobis(arma::mat x, arma::rowvec center, arma::mat cov){<BR>    int n = x.n_rows;<BR>    arma::mat x_cen;<BR>    x_cen.copy_size(x);<BR>    for (int i=0; i < n; i++) {<BR>        x_cen.row(i) = x.row(i) - center;<BR>    }<BR>    return sum((x_cen * cov.i()) % x_cen, 1);    <BR>}<BR><BR><BR>require("Rcpp")<BR>Sys.setenv("PKG_CXXFLAGS"="-fopenmp")<BR>Sys.setenv("PKG_LIBS"="-fopenmp")<BR> sourceCpp("rr.cpp")<BR><BR><BR>ERROR :<BR>g++ -m32 -I"C:/PROGRA~1/R/R-30~1.1/include" -DNDEBUG     -I"C:/Users/gianni/Documents/R/win-library/3.0/Rcpp/include" -I"C:/Users/gianni/Documents/R/win-library/3.0/RcppArmadillo/include" -I"C:/Users/gianni/Documents/R/win-library/3.0/RcppProgress/include"  -I"d:/RCompile/CRANpkg/extralibs64/local/include"  -fopenmp   -O2 -Wall  -mtune=core2 -c rr.cpp -o rr.o In file included from rr.cpp:10:0: C:/Users/gianni/Documents/R/win-library/3.0/RcppProgress/include/progress.hpp: In constructor 'Progress::Progress(long unsigned int, bool)': C:/Users/gianni/Documents/R/win-library/3.0/RcppProgress/include/progress.hpp:27:84: error: 'error' was not declared in this scope make: *** [rr.o] Error 1 <BR>Errore in sourceCpp("rr.cpp") : Error 1 occurred building shared library.<BR><BR><BR>many thanks in advance</P>