[Rcpp-devel] an error message from RcppArmadillo: sourceRcpp
baptiste auguie
baptiste.auguie at gmail.com
Tue Jan 29 07:45:23 CET 2013
Hi,
I believe you're missing this line:
// [[Rcpp::depends("RcppArmadillo")]]
HTH,
baptiste
On 29 January 2013 19:08, Aileen Lin <aileenshanhong.lin at gmail.com> wrote:
> Hi there,
>
> I get RcppArmadillo running, but still has a problem
> with Rcpp::sourceCpp(). My code is here:
>
> #include <Rcpp.h>
> #include <RcppArmadillo.h>
> using namespace Rcpp;
>
> //[[Rcpp::export]]
> NumericMatrix add(NumericMatrix b){
>
> return b.n_cols;
> }
>
> > Rcpp::sourceCpp('add.cpp')
> g++ -m64 -I"C:/R/R-215~1.2/include" -DNDEBUG
> -I"C:/Users/Aileen/Documents/R/win-library/2.15/Rcpp/include"
> -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall
> -mtune=core2 -c add.cpp -o add.o add.cpp:2:27: fatal error:
> RcppArmadillo.h: No such file or directory compilation terminated. make:
> *** [add.o] Error 1
> Error in Rcpp::sourceCpp("add.cpp") :
> Error 1 occurred building shared library.
>
> Could anyone tell me what I did wrongly? Thank you.
>
> Regards,
> Aileen
>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130129/05620d27/attachment-0001.html>
More information about the Rcpp-devel
mailing list