<div>Hello Mr. Romain,</div>
<div> Thanks for replying. Yes it is window. How to check R is correctly installed? </div>
<div>Even with verbose it does not work. It give the same error. I am printing sessionInfo() result and cxxfunction with verbose below. </div>
<div> </div>
<div><strong><font color="#ff0000">> sessionInfo()<br></font></strong>R version 2.11.1 (2010-05-31) <br>i386-pc-mingw32 </div>
<div>locale:<br>[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C <br>[5] LC_TIME=English_United States.1252 </div>
<div>attached base packages:<br>[1] stats graphics grDevices utils datasets methods base </div>
<div>other attached packages:<br>[1] inline_0.3.5</div>
<div>loaded via a namespace (and not attached):<br>[1] tools_2.11.1<br></div>
<div> </div>
<div> </div>
<div><font color="#660000"> fx <- cxxfunction( signature(x = "integer", y = "numeric" ) , '<br>+ return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;<br>+ ' ,verbose = FALSE)</font></div>
<div><font color="#ff0000">ERROR(s) during compilation: source code errors or compiler configuration errors!</font></div>
<div>Program source:<br> 1: // includes from the plugin<br> 2: #include <R.h><br> 3: #include <Rdefines.h><br> 4: #include <R_ext/Error.h><br> 5: <br> 6: <br> 7: // user includes<br> 8: <br> 9: <br>
10: // declaration<br> 11: extern "C" {<br> 12: SEXP file4a313dd0( SEXP x, SEXP y) ;<br> 13: }<br> 14: <br> 15: // definition<br> 16: <br> 17: SEXP file4a313dd0( SEXP x, SEXP y ){<br> 18: <br> 19: return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;<br>
20: <br> 21: Rf_warning("your C++ program does not return anything"); <br> 22: return R_NilValue ; <br> 23: }<br> 24: <br> 25: <br>Error in compileCode(f, code, language = language, verbose = verbose) : <br> Compilation ERROR, function(s)/method(s) not created!<br>
<br><br>Thanks</div>
<div>Param</div>
<div> </div>
<div class="gmail_quote">On Wed, Jul 21, 2010 at 6:56 PM, <span dir="ltr"><<a href="mailto:romain@r-enthusiasts.com">romain@r-enthusiasts.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div bgcolor="#FFFFFF">
<div>Hello, </div>
<div><br></div>
<div>Thanks for reposting here. Which operating system is this ? If windows, do you have Rtools properly installed ?</div>
<div><br></div>
<div>Can you try to use the "verbose" argument of cxxfunction </div>
<div><br></div>
<div>Romain</div>
<div><br><br>
<div><br></div></div>
<div><br>Le 21 juil. 2010 à 02:34, param jeet <<a href="mailto:humtumiit@gmail.com" target="_blank">humtumiit@gmail.com</a>> a écrit :<br><br></div>
<div>
<div></div>
<div class="h5">
<div></div>
<blockquote type="cite">
<div>
<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 <- cxxfunction( signature( x = "numeric" ),<br>+ ' NumericVector xx(x); return wrap( std::accumulate( xx.begin(), xx.end(), 0.0 ) ) ; '<br>+ , plugin = "Rcpp")<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 <Rcpp.h><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 "C" {<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></div></blockquote></div></div>
<blockquote type="cite">
<div><span>_______________________________________________</span><br><span>Rcpp-devel mailing list</span>
<div class="im"><br><span><a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a></span><br></div>
<div class="im"><span><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></span><br></div></div></blockquote>
</div></blockquote></div><br>