Hi Christian,<div><br></div><div>Thanks for the source file. Below are the full results as you requested. It's giving the same error as before. Is 64-bit R supported?</div><div><br></div><div>Henry</div><div><br></div>
<div><blockquote>> 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 xa(a);’‘Rcpp::NumericVector xb(b);’‘int n_xa = xa.size(), n_xb = xb.size();’‘’‘Rcpp::NumericVector xab(n_xa + n_xb - 1);’‘for (int i = 0; i < n_xa; i++)’‘for (int j = 0; j < n_xb; j++)’‘xab[i + j] += xa[i] * xb[j];’‘return xab;’‘')’<br>
>>>> eval(expression_nr. 3 )<br> =================<br>> fun <- cxxfunction( signature(a="numeric", b="numeric"), src, plugin="Rcpp", verbose=TRUE)<br> >> setting environment variables: <br>
PKG_LIBS = D:/Users/Henry/Documents/R/win-library/2.12/Rcpp/lib/x64/libRcpp.a<br> >> LinkingTo : Rcpp<br>CLINK_CPPFLAGS = -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> file5a2532f3.cpp.err.txt <br>ERROR(s) during compilation: source code errors or compiler configuration 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 file5a2532f3.cpp 2> file5a2532f3.cpp.err.txt' had status 1 <br>
> </blockquote></div><div><br></div><div><br><br><div class="gmail_quote">2011/3/21 Christian Gunning <span dir="ltr"><<a href="mailto:icos.atropa@gmail.com">icos.atropa@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
"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>
<font color="#888888"><br>
--<br>
A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!<br>
</font></blockquote></div><br></div>