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

Wolf Vollprecht w.vollprecht at gmail.com
Mon Jun 12 10:11:32 CEST 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20170612/f6f1840a/attachment.html>


More information about the Rcpp-devel mailing list