Hello randomcz, Thank you for your interrest in Rcpp. Rcpp has its own mailing list. http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Please subscribe and report your question there. People will be happy to help you.
Romain Le 03/12/10 03:57, randomcz a écrit :
Hi, I am a newbie to Rcpp packages, and got problems in having basic set-ups for Rcpp under windows xp. Here is the list I have done. 1) installed Rtools and have no problem in compiling .c file. 2) installed Rcpp packages 3) set enviroment variables 'path' to make C:\Program Files\R\R-2.12.0\library\Rcpp\include\ searchable The sample C++ code I used is from the original website: http://dirk.eddelbuettel.com/code/rcpp.examples.html #include<Rcpp.h> RcppExport SEXP newRcppVectorExample(SEXP vector) { Rcpp::NumericVector orig(vector); // keep a copy (as the classic version does) Rcpp::NumericVector vec(orig.size()); // create a target vector of the same size // we could query size via // int n = vec.size(); // and loop over the vector, but using the STL is so much nicer // so we use a STL transform() algorithm on each element std::transform(orig.begin(), orig.end(), vec.begin(), sqrt); Rcpp::Pairlist res(Rcpp::Named( "result", vec), Rcpp::Named( "original", orig)); return res; } I got bunch of error messages like: test.o:test.cpp:(.test+0x141): undefined reference to 'RcppResultSet::RcppResultSet()' ... undefined reference to 'double* Rcpp::internal::r_vector_start<14,double>(SEXPREC*)' collect2: ld returned 1 exit status Can someone help me out? Thanks,
-- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/hovakS : RcppGSL initial release |- http://bit.ly/iaxTdO : parser 0.0-12 `- http://bit.ly/gnCl01 : Rcpp 0.8.9 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.