[Rcpp-devel] cxxfunction()

romain at r-enthusiasts.com romain at r-enthusiasts.com
Wed Jul 21 15:26:26 CEST 2010


Hello, 

Thanks for reposting here. Which operating system is this ? If windows, do you have Rtools properly installed ?

Can you try to use the "verbose" argument of cxxfunction 

Romain




Le 21 juil. 2010 à 02:34, param jeet <humtumiit at gmail.com> a écrit :

> Hello,
>   
> I have to work with Rcpp interface. I have installed packages inline and Rcpp. 
>  
> When I use the function below, I get the error. Error is following function statement below.  How to sort out this problem?
> I would appreciate your help.
>  
>  
> fx <- cxxfunction( signature( x = "numeric" ),
> + ' NumericVector xx(x); return wrap( std::accumulate( xx.begin(), xx.end(), 0.0 ) ) ; '
> + , plugin = "Rcpp")
> 
> ERROR(s) during compilation: source code errors or compiler configuration errors!
> 
> Program source:
> 1: // includes from the plugin
> 2: 
> 3: #include <Rcpp.h>
> 4: 
> 5: 
> 6: #ifndef BEGIN_RCPP
> 7: #define BEGIN_RCPP
> 8: #endif
> 9: 
> 10: #ifndef END_RCPP
> 11: #define END_RCPP
> 12: #endif
> 13: 
> 14: using namespace Rcpp;
> 15: 
> 16: 
> 17: // user includes
> 18: 
> 19: 
> 20: // declaration
> 21: extern "C" {
> 22: SEXP file712b6459( SEXP x) ;
> 23: }
> 24: 
> 25: // definition
> 26: 
> 27: SEXP file712b6459( SEXP x ){
> 28: BEGIN_RCPP
> 29: NumericVector xx(x); return wrap( std::accumulate( xx.begin(), xx.end(), 0.0 ) ) ; 
> 30: END_RCPP
> 31: }
> 32: 
> 33: 
> Error in compileCode(f, code, language = language, verbose = verbose) : 
> Compilation ERROR, function(s)/method(s) not created!
> 
>  
> I would appreciate your help.
>  
> Regards:
> Param
>  
>  
> 
> 
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20100721/1595ca5d/attachment.htm>


More information about the Rcpp-devel mailing list