Hi,<br><br>Ive been trying to make RcppArmadillo work using the example file (fastLM). I copied and pasted the code and saved it as RcppArmadilloEg.cpp (not to use fastLM but to figure out how to work RcppArmadillo). Then i tried using the command R CMD SHLIB RcppArmadilloEg.cpp but an error came up saying that RcppArmadillo.h not found.<br>
<br>So i tried doing a symbolic link from /usr/local/include to the directory where RcppArmadillo.h and RcppArmadilloDefines.h is stored. I also did a symbolic link analogously for RcppArmadillo.so. When i ran R CMD SHLIB again I got the following error:<br>
<br>abhisek@shieks:~/Desktop/Personal/Test$ R CMD SHLIB RcppArmadilloEg.cpp<br>g++ -I/usr/share/R/include -I/home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib -fpic -g -O2 -c RcppArmadilloEg.cpp -o RcppArmadilloEg.o<br>
In file included from /home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/RcppCommon.h:215,<br> from /home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/Rcpp.h:28,<br> from RcppArmadilloEg.cpp:1:<br>
/home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/Rcpp/internal/wrap.h: In function ‘SEXPREC* Rcpp::internal::wrap_dispatch_unknown_iterable(const T&, Rcpp::traits::false_type) [with T = arma::Col<double>]’:<br>
/home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/Rcpp/internal/wrap.h:491: instantiated from ‘SEXPREC* Rcpp::internal::wrap_dispatch_unknown(const T&, Rcpp::traits::false_type) [with T = arma::Col<double>]’<br>
/home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/Rcpp/internal/wrap.h:509: instantiated from ‘SEXPREC* Rcpp::internal::wrap_dispatch_unknown_importable(const T&, Rcpp::traits::false_type) [with T = arma::Col<double>]’<br>
/home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/Rcpp/internal/wrap.h:526: instantiated from ‘SEXPREC* Rcpp::internal::wrap_dispatch(const T&, Rcpp::traits::wrap_type_unknown_tag) [with T = arma::Col<double>]’<br>
/home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/Rcpp/internal/wrap.h:541: instantiated from ‘SEXPREC* Rcpp::wrap(const T&) [with T = arma::Col<double>]’<br>/home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/Rcpp/Named.h:54: instantiated from ‘Rcpp::Named::Named(const std::string&, const T&) [with T = arma::colvec]’<br>
RcppArmadilloEg.cpp:19: instantiated from here<br>/home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/Rcpp/internal/wrap.h:394: error: cannot convert ‘const arma::Col<double>’ to ‘SEXPREC*’ in initialization<br>
make: *** [RcppArmadilloEg.o] Error 1<br><br><br>could someone provide some advice?<br><br>Many thanks!<br>Abhisek<br>