[Rcpp-devel] Starting R Interpreter from C++

Romain Francois romain at r-enthusiasts.com
Mon Jun 12 11:22:26 CEST 2017


You might be looking for RInside.


> Le 12 juin 2017 à 10:11, Wolf Vollprecht <w.vollprecht at gmail.com> a écrit :
> 
> I am trying to run C++ tests from C++ directly. 
> It looks like I need to start the R interpreter for memory management etc.
> 
> So far I have achieved moderate success through:
> 
> int Rf_initEmbeddedR(int argc, char **argv)
> {
>     Rf_initialize_R(argc, argv);
>     setup_Rmainloop();
>     return 1;
> }
> 
> 
> However, the code crashes with 
> 
> Error: function 'dataptr' not provided by package 'Rcpp'
> Fatal error: unable to initialize the JIT
> 
> Is there a simpler way to initialize the R environment from C++ (through Rcpp?). Or any other insights?
> 
> Best, 
> 
> Wolf
> _______________________________________________
> 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/20170612/c9c048b1/attachment.html>


More information about the Rcpp-devel mailing list