Hi, I believe you're missing this line:
// [[Rcpp::depends("RcppArmadillo")]] HTH, baptiste On 29 January 2013 19:08, Aileen Lin <aileenshanhong....@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@lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel >
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel