Hi Dirk,<br><br>I downloaded the stuff just last friday so it should be the latest version of Rcpp as well as Armadillo. I used install.packages() for Rcpp and RcppArmadillo. Armadillo is 0.9.4. Im using xubuntu karmic koala.<br>
<br>i also had some problem using Armadillo which I posted on the Armadillo discussion board. Conrad got back to me. Here is the discussion:<br><a href="https://sourceforge.net/apps/phpbb/arma/viewtopic.php?f=1&t=4">https://sourceforge.net/apps/phpbb/arma/viewtopic.php?f=1&t=4</a><br>
<br>so it may be that armadillo is the problem but im really not sure.<br><br>Many thanks<br>Abhisek<br><br><div class="gmail_quote">On Fri, Mar 26, 2010 at 12:17 PM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org">edd@debian.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
(resending, this time to list I omitted last time, sorry. --Dirk)<br>
<div class="im"><br>
On 26 March 2010 at 11:10, Abhisek wrote:<br>
</div><div class="im">| Hi,<br>
|<br>
| Ive been trying to make RcppArmadillo work using the example file (fastLM).<br>
| I copied and pasted the code and saved it as RcppArmadilloEg.cpp (not to use<br>
| fastLM but to figure out how to work RcppArmadillo). Then i tried using the<br>
| command R CMD SHLIB RcppArmadilloEg.cpp but an error came up saying that<br>
| RcppArmadillo.h not found.<br>
|<br>
| So i tried doing a symbolic link from /usr/local/include to the directory<br>
| where RcppArmadillo.h and RcppArmadilloDefines.h is stored. I also did a<br>
| symbolic link analogously for RcppArmadillo.so. When i ran R CMD SHLIB<br>
| 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<br>
| -I/home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib -fpic -g -O2 -c<br>
| RcppArmadilloEg.cpp -o RcppArmadilloEg.o<br>
<br>
</div><div class="im">So far so good: one -I for R as usual, one for Rcpp.<br>
<br>
</div><div><div></div><div class="h5">| In file included from<br>
| /home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/RcppCommon.h:215,<br>
| from<br>
| /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:<br>
| In function ‘SEXPREC* Rcpp::internal::wrap_dispatch_unknown_iterable(const<br>
| 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:<br>
| instantiated from ‘SEXPREC* Rcpp::internal::wrap_dispatch_unknown(const T&,<br>
| 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:<br>
| instantiated from ‘SEXPREC*<br>
| Rcpp::internal::wrap_dispatch_unknown_importable(const T&,<br>
| 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:<br>
| instantiated from ‘SEXPREC* Rcpp::internal::wrap_dispatch(const T&,<br>
| 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:<br>
| instantiated from ‘SEXPREC* Rcpp::wrap(const T&) [with T =<br>
| arma::Col<double>]’<br>
| /home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/Rcpp/Named.h:54:<br>
| instantiated from ‘Rcpp::Named::Named(const std::string&, const T&) [with T<br>
| = 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:<br>
| error: cannot convert ‘const arma::Col<double>’ to ‘SEXPREC*’ in<br>
| initialization<br>
| make: *** [RcppArmadilloEg.o] Error 1<br>
|<br>
|<br>
| could someone provide some advice?<br>
<br>
</div></div><div><div></div><div class="h5">Which Rcpp version do you have installed?<br>
<br>
Which Armadillo version do you have installed?<br>
<br>
I have not tried the free-floating direct compile you try here. Maybe the<br>
defines for RcppArmadillo that we use are missing here -- hard to say.<br>
<br>
Could you try to create your own little package but copying the RcppArmadillo<br>
files, changes DESCRIPTION to what you do and changes the FastLM code in C++<br>
and R?<br>
<br>
Dirk<br>
<br>
--<br>
Registration is open for the 2nd International conference R / Finance 2010<br>
See <a href="http://www.RinFinance.com" target="_blank">http://www.RinFinance.com</a> for details, and see you in Chicago in April!<br>
</div></div></blockquote></div><br>