Re: [Rd] R CMD SHLIB in Windows XP - No output at all

From: Lorenzo <lorenzo.lucido_at_asia.bnpparibas.com>
Date: Wed, 15 Feb 2012 15:32:47 -0800 (PST)

Hi Dirk,

Thanks for your suggestion.
Seems that I have the same issue with the inline package, here is my output :

############ INLINE SIMPLE EXAMPLE

> library(Rcpp)
> library(inline)
> library(RcppArmadillo)
> foo <- '

+ int i, j, na, nb, nab;
+ double *xa, *xb, *xab;
+ SEXP ab;
+
+ PROTECT(a = AS_NUMERIC(a));
+ PROTECT(b = AS_NUMERIC(b));
+ na = LENGTH(a); nb = LENGTH(b); nab = na + nb - 1;
+ PROTECT(ab = NEW_NUMERIC(nab));
+ xa = NUMERIC_POINTER(a); xb = NUMERIC_POINTER(b);
+ xab = NUMERIC_POINTER(ab);
+ for(i = 0; i < nab; i++) xab[i] = 0.0;
+ for(i = 0; i < na; i++)
+ for(j = 0; j < nb; j++) xab[i + j] += xa[i] * xb[j];
+ UNPROTECT(3);
+ return(ab);
+ '

> foo
[1] "\n int i, j, na, nb, nab;\n double *xa, *xb, *xab;\n SEXP ab;\n\n PROTECT(a = AS_NUMERIC(a));\n PROTECT(b = AS_NUMERIC(b));\n na = LENGTH(a); nb = LENGTH(b); nab = na + nb - 1;\n PROTECT(ab = NEW_NUMERIC(nab));\n xa = NUMERIC_POINTER(a); xb = NUMERIC_POINTER(b);\n xab = NUMERIC_POINTER(ab);\n for(i = 0; i < nab; i++) xab[i] = 0.0;\n for(i = 0; i < na; i++)\n for(j = 0; j < nb; j++) xab[i + j] += xa[i] * xb[j];\n UNPROTECT(3);\n return(ab);\n" > funx <- cfunction(signature(a="numeric",b="numeric"), foo, Rcpp=FALSE, > verbose=FALSE)

ERROR(s) during compilation: source code errors or compiler configuration errors!

Program source:

  1. #include <R.h>
  2. #include <Rdefines.h>
  3. #include <R_ext/Error.h> 4: 5:
  4. extern "C" {
  5. SEXP file48858916c0f ( SEXP a, SEXP b );
  6. } 9:
  7. SEXP file48858916c0f ( SEXP a, SEXP b ) { 11:
  8. int i, j, na, nb, nab;
  9. double *xa, *xb, *xab;
  10. SEXP ab; 15:
  11. PROTECT(a = AS_NUMERIC(a));
  12. PROTECT(b = AS_NUMERIC(b));
  13. na = LENGTH(a); nb = LENGTH(b); nab = na + nb - 1;
  14. PROTECT(ab = NEW_NUMERIC(nab));
  15. xa = NUMERIC_POINTER(a); xb = NUMERIC_POINTER(b);
  16. xab = NUMERIC_POINTER(ab);
  17. for(i = 0; i < nab; i++) xab[i] = 0.0;
  18. for(i = 0; i < na; i++)
  19. for(j = 0; j < nb; j++) xab[i + j] += xa[i] * xb[j];
  20. UNPROTECT(3);
  21. return(ab); 27:
  22. warning("your C program does not return anything!");
  23. return R_NilValue;
  24. } *Error in compileCode(f, code, language, verbose) : Compilation ERROR, function(s)/method(s) not created! In addition: Warning message: running command 'C:/Trading/R/R-2.14.1/bin/i386/R CMD SHLIB file48858916c0f.cpp 2> file48858916c0f.cpp.err.txt' had status 1 * #####################################

Looks like my issue on R CMD SHLIB is causing the compileCode function to fail.

--
View this message in context: http://r.789695.n4.nabble.com/R-CMD-SHLIB-in-Windows-XP-No-output-at-all-tp4385797p4392407.html
Sent from the R devel mailing list archive at Nabble.com.

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed 15 Feb 2012 - 23:34:56 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 16 Feb 2012 - 01:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive