Hi Douglas,<div><br></div><div>I assume I do not need to do anything with R after installing RTools? I reinstalled RTools and restarted R and got the same errors.</div><div><br></div><div>Henry<br><br><div class="gmail_quote">
On Tue, Mar 22, 2011 at 12:24 PM, Douglas Bates <span dir="ltr"><<a href="mailto:bates@stat.wisc.edu">bates@stat.wisc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, Mar 22, 2011 at 2:16 PM, Henry Bee <<a href="mailto:henry.bee@gmail.com">henry.bee@gmail.com</a>> wrote:<br>
> Hi Christian,<br>
> Thanks for the source file. Below are the full results as you requested.<br>
> It's giving the same error as before. Is 64-bit R supported?<br>
<br>
</div>64-bit R is supported. Has it already been established that you have<br>
the Rtools (compilers, linkers, etc.) from<br>
<a href="http://www.murdoch-sutherland.com/Rtools/" target="_blank">www.murdoch-sutherland.com/Rtools/</a> installed?<br>
<div><div></div><div class="h5"><br>
>> source('tmp.R', verbose = TRUE)<br>
> 'envir' chosen:<environment: R_GlobalEnv><br>
> encoding = "native.enc" chosen<br>
> --> parsed 3 expressions; now eval(.)ing them:<br>
>>>>> eval(expression_nr. 1 )<br>
> =================<br>
>> require(inline)<br>
> curr.fun: symbol require<br>
> .. after ‘expression(require(inline))’<br>
>>>>> eval(expression_nr. 2 )<br>
> =================<br>
>> src <- '<br>
> + Rcpp::NumericVector xa(a);<br>
> + Rcpp::NumericVector xb(b);<br>
> + int n_xa = xa.size(), n_xb = xb.size();<br>
> +<br>
> + Rcpp::NumericVector xab(n_xa + n_x .... [TRUNCATED]<br>
> curr.fun: symbol <-<br>
> .. after ‘expression(src <- '’‘Rcpp::NumericVector<br>
> xa(a);’‘Rcpp::NumericVector xb(b);’‘int n_xa = xa.size(), n_xb =<br>
> xb.size();’‘’‘Rcpp::NumericVector xab(n_xa + n_xb - 1);’‘for (int i = 0; i <<br>
> n_xa; i++)’‘for (int j = 0; j < n_xb; j++)’‘xab[i + j] += xa[i] *<br>
> xb[j];’‘return xab;’‘')’<br>
>>>>> eval(expression_nr. 3 )<br>
> =================<br>
>> fun <- cxxfunction( signature(a="numeric", b="numeric"), src,<br>
>> plugin="Rcpp", verbose=TRUE)<br>
> >> setting environment variables:<br>
> PKG_LIBS =<br>
> D:/Users/Henry/Documents/R/win-library/2.12/Rcpp/lib/x64/libRcpp.a<br>
> >> LinkingTo : Rcpp<br>
> CLINK_CPPFLAGS =<br>
> -I"D:/Users/Henry/Documents/R/win-library/2.12/Rcpp/include"<br>
> >> Program source :<br>
> 1 :<br>
> 2 : // includes from the plugin<br>
> 3 :<br>
> 4 : #include <Rcpp.h><br>
> 5 :<br>
> 6 :<br>
> 7 : #ifndef BEGIN_RCPP<br>
> 8 : #define BEGIN_RCPP<br>
> 9 : #endif<br>
> 10 :<br>
> 11 : #ifndef END_RCPP<br>
> 12 : #define END_RCPP<br>
> 13 : #endif<br>
> 14 :<br>
> 15 : using namespace Rcpp;<br>
> 16 :<br>
> 17 :<br>
> 18 : // user includes<br>
> 19 :<br>
> 20 :<br>
> 21 : // declarations<br>
> 22 : extern "C" {<br>
> 23 : SEXP file5a2532f3( SEXP a, SEXP b) ;<br>
> 24 : }<br>
> 25 :<br>
> 26 : // definition<br>
> 27 :<br>
> 28 : SEXP file5a2532f3( SEXP a, SEXP b ){<br>
> 29 : BEGIN_RCPP<br>
> 30 :<br>
> 31 : Rcpp::NumericVector xa(a);<br>
> 32 : Rcpp::NumericVector xb(b);<br>
> 33 : int n_xa = xa.size(), n_xb = xb.size();<br>
> 34 :<br>
> 35 : Rcpp::NumericVector xab(n_xa + n_xb - 1);<br>
> 36 : for (int i = 0; i < n_xa; i++)<br>
> 37 : for (int j = 0; j < n_xb; j++)<br>
> 38 : xab[i + j] += xa[i] * xb[j];<br>
> 39 : return xab;<br>
> 40 :<br>
> 41 : END_RCPP<br>
> 42 : }<br>
> 43 :<br>
> 44 :<br>
> Compilation argument:<br>
> C:\PROGRA~1\R\R-212~1.2/bin/x64/R CMD SHLIB file5a2532f3.cpp 2><br>
> file5a2532f3.cpp.err.txt<br>
> ERROR(s) during compilation: source code errors or compiler configuration<br>
> errors!<br>
> Program source:<br>
> 1:<br>
> 2: // includes from the plugin<br>
> 3:<br>
> 4: #include <Rcpp.h><br>
> 5:<br>
> 6:<br>
> 7: #ifndef BEGIN_RCPP<br>
> 8: #define BEGIN_RCPP<br>
> 9: #endif<br>
> 10:<br>
> 11: #ifndef END_RCPP<br>
> 12: #define END_RCPP<br>
> 13: #endif<br>
> 14:<br>
> 15: using namespace Rcpp;<br>
> 16:<br>
> 17:<br>
> 18: // user includes<br>
> 19:<br>
> 20:<br>
> 21: // declarations<br>
> 22: extern "C" {<br>
> 23: SEXP file5a2532f3( SEXP a, SEXP b) ;<br>
> 24: }<br>
> 25:<br>
> 26: // definition<br>
> 27:<br>
> 28: SEXP file5a2532f3( SEXP a, SEXP b ){<br>
> 29: BEGIN_RCPP<br>
> 30:<br>
> 31: Rcpp::NumericVector xa(a);<br>
> 32: Rcpp::NumericVector xb(b);<br>
> 33: int n_xa = xa.size(), n_xb = xb.size();<br>
> 34:<br>
> 35: Rcpp::NumericVector xab(n_xa + n_xb - 1);<br>
> 36: for (int i = 0; i < n_xa; i++)<br>
> 37: for (int j = 0; j < n_xb; j++)<br>
> 38: xab[i + j] += xa[i] * xb[j];<br>
> 39: return xab;<br>
> 40:<br>
> 41: END_RCPP<br>
> 42: }<br>
> 43:<br>
> 44:<br>
> Error in compileCode(f, code, language = language, verbose = verbose) :<br>
> Compilation ERROR, function(s)/method(s) not created!<br>
> In addition: Warning message:<br>
> running command 'C:\PROGRA~1\R\R-212~1.2/bin/x64/R CMD SHLIB<br>
> file5a2532f3.cpp 2> file5a2532f3.cpp.err.txt' had status 1<br>
>><br>
><br>
><br>
> 2011/3/21 Christian Gunning <<a href="mailto:icos.atropa@gmail.com">icos.atropa@gmail.com</a>><br>
>><br>
>> "Here's the command:"<br>
>><br>
>> Works for me. Try sourcing the attached file (which includes your<br>
>> command, +verbose=T), and post back the *full* results, including the<br>
>> source('tmp.R.txt') command and the next prompt line.<br>
>><br>
>> -christian<br>
>><br>
>> --<br>
>> A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!<br>
><br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> Rcpp-devel mailing list<br>
> <a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
> <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><br>
><br>
><br>
</div></div></blockquote></div><br></div>