[Rcpp-devel] cxxfunction()

param jeet humtumiit at gmail.com
Thu Jul 22 04:04:02 CEST 2010


Hello,
  Still got error:

 fx <- cxxfunction( signature(x = "integer", y = "numeric" ) , '
+ return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
+  ' ,verbose = TRUE)
 >> Program source :
   1 : // includes from the plugin
   2 : #include <R.h>
   3 : #include <Rdefines.h>
   4 : #include <R_ext/Error.h>
   5 :
   6 :
   7 : // user includes
   8 :
   9 :
  10 : // declaration
  11 : extern "C" {
  12 : SEXP file8616435( SEXP x, SEXP y) ;
  13 : }
  14 :
  15 : // definition
  16 :
  17 : SEXP file8616435( SEXP x, SEXP y ){
  18 :
  19 : return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
  20 :
  21 : Rf_warning("your C++ program does not return anything");
  22 :  return R_NilValue ;
  23 : }
  24 :
  25 :
*Compilation argument:
 **\\In-fs1\UserDocuments\PARAM~1.JEE\MYDOCU~1\R\R-211~1.1/bin/R*<file://in-fs1/UserDocuments/PARAM~1.JEE/MYDOCU~1/R/R-211~1.1/bin/R>
* CMD SHLIB file8616435.cpp
'sh' is not recognized as an internal or external command,
operable program or batch file.*
**
*ERROR(s) during compilation: source code errors or compiler configuration
errors!*
Program source:
  1: // includes from the plugin
  2: #include <R.h>
  3: #include <Rdefines.h>
  4: #include <R_ext/Error.h>
  5:
  6:
  7: // user includes
  8:
  9:
 10: // declaration
 11: extern "C" {
 12: SEXP file8616435( SEXP x, SEXP y) ;
 13: }
 14:
 15: // definition
 16:
 17: SEXP file8616435( SEXP x, SEXP y ){
 18:
 19: return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
 20:
 21: Rf_warning("your C++ program does not return anything");
 22:  return R_NilValue ;
 23: }
 24:
 25:
Error in compileCode(f, code, language = language, verbose = verbose) :
  Compilation ERROR, function(s)/method(s) not created!

Param

On Wed, Jul 21, 2010 at 8:19 PM, Davor Cubranic <cubranic at stat.ubc.ca>wrote:

> You should probably try 'verbose = TRUE'.
>
> Davor
>
> On July 21, 2010 06:44:05 am param jeet wrote:
> > Hello Mr. Romain,
> >   Thanks for replying. Yes it is window. How to check R is correctly
> > installed?
> > Even with verbose it does not work. It give the same error. I am
> > printing sessionInfo() result and cxxfunction with verbose below.
> [...]
> >  fx <- cxxfunction( signature(x = "integer", y = "numeric" ) , '
> > + return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
> > + ' ,verbose = FALSE)
> > ERROR(s) during compilation: source code errors or compiler
> > configuration errors!
> [...]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20100722/2e7e1e02/attachment.html>


More information about the Rcpp-devel mailing list