<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Hi,<br><br>I am a newbie to Rcpp packages, and got problems in having basic set-ups for<br>Rcpp under windows xp. Here is the list I have done.<br>
<br>1) installed Rtools and have no problem in compiling .c file and also no problem in using &#39;incline&#39; package.<br>2) installed Rcpp packages<br>3) set enviroment variables &#39;path&#39; to make C:\Program Files\R\R-2.12.0\library\Rcpp\include\<br>
<br>The sample C++ code I used is from the original website:<br><a href="http://dirk.eddelbuettel.com/code/rcpp.examples.html" target="_blank" style="color: rgb(0, 0, 204); ">http://dirk.eddelbuettel.com/code/rcpp.examples.html</a><br>
<br>#include&lt;Rcpp.h&gt;<br><br>RcppExport SEXP newRcppVectorExample(SEXP vector) {<br><br>    Rcpp::NumericVector orig(vector);                  // keep a copy (as the classic<br>version does)<br>    Rcpp::NumericVector vec(orig.size());              // create a target vector of the<br>
same size<br><br>    // we could query size via<br>    //   int n = vec.size();<br>    // and loop over the vector, but using the STL is so much nicer<br>    // so we use a STL transform() algorithm on each element<br>    std::transform(orig.begin(), orig.end(), vec.begin(), sqrt);<br>
<br>    Rcpp::Pairlist res(Rcpp::Named( &quot;result&quot;, vec),<br>                       Rcpp::Named( &quot;original&quot;, orig));<br><br>    return res;<br>}<br><br>I got bunch of error messages like:<br>test.o:test.cpp:(.test+0x141): undefined reference to<br>
&#39;RcppResultSet::RcppResultSet()&#39;<br>...<br>undefined reference to &#39;double*<br>Rcpp::internal::r_vector_start&lt;14,double&gt;(SEXPREC*)&#39;<br>collect2: ld returned 1 exit status<br><br>Can someone help me out?<br>
<br>Thanks,</span>