<div class="gmail_quote">
<div class="gmail_quote">
<div>Hello,</div>
<div>  </div>
<div>I have to work with Rcpp interface. I have installed packages inline and Rcpp. </div>
<div> </div>
<div>When I use the function below, I get the error. Error is following function statement below.  How to sort out this problem? </div>
<div>
<div>I would appreciate your help. </div>
<div> </div></div>
<div> </div>
<div>fx &lt;- cxxfunction( signature( x = &quot;numeric&quot; ),<br>+ &#39; NumericVector xx(x); return wrap( std::accumulate( xx.begin(), xx.end(), 0.0 ) ) ; &#39;<br>+ , plugin = &quot;Rcpp&quot;)<br><br><strong><font color="#ff0000">ERROR(s) during compilation: source code errors or compiler configuration errors!</font></strong><br>
<br>Program source:<br>1: // includes from the plugin<br>2: <br>3: #include &lt;Rcpp.h&gt;<br>4: <br>5: <br>6: #ifndef BEGIN_RCPP<br>7: #define BEGIN_RCPP<br>8: #endif<br>9: <br>10: #ifndef END_RCPP<br>11: #define END_RCPP<br>
12: #endif<br>13: <br>14: using namespace Rcpp;<br>15: <br>16: <br>17: // user includes<br>18: <br>19: <br>20: // declaration<br>21: extern &quot;C&quot; {<br>22: SEXP file712b6459( SEXP x) ;<br>23: }<br>24: <br>25: // definition<br>
26: <br>27: SEXP file712b6459( SEXP x ){<br>28: BEGIN_RCPP<br>29: NumericVector xx(x); return wrap( std::accumulate( xx.begin(), xx.end(), 0.0 ) ) ; <br>30: END_RCPP<br>31: }<br>32: <br>33: <br>Error in compileCode(f, code, language = language, verbose = verbose) : <br>
Compilation ERROR, function(s)/method(s) not created!<br><br></div>
<div> </div>
<div>I would appreciate your help. </div>
<div> </div>
<div>Regards:</div>
<div>Param<br></div>
<div> </div>
<div> </div></div><br></div><br>