[Rcpp-devel] RcppArmadillo error

Abhisek shieks at gmail.com
Fri Mar 26 12:10:30 CET 2010


Hi,

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.

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:

abhisek at shieks:~/Desktop/Personal/Test$ R CMD SHLIB RcppArmadilloEg.cpp
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
In file included from
/home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/RcppCommon.h:215,
                 from
/home/abhisek/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib/Rcpp.h:28,
                 from RcppArmadilloEg.cpp:1:
/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>]’:
/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>]’
/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>]’
/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>]’
/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>]’
/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]’
RcppArmadilloEg.cpp:19:   instantiated from here
/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
make: *** [RcppArmadilloEg.o] Error 1


could someone provide some advice?

Many thanks!
Abhisek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20100326/1df2da3e/attachment.htm 


More information about the Rcpp-devel mailing list