You might have more luck getting help with a completely self-contained example (no QT in particular) and a complete description of how you built and ran your example.
That said, the placement of the call to Rf_endEmbedded looks a little odd. Best, luke On Thu, 12 Jul 2018, Andéol Evain wrote:
Hello everyone, I have a C++ program that calls R using R_tryEval, very similarly to what package RInside does. It used to work with R.3.4.3 and R.3.4.4. However, since I updated it to R.3.5.1, R sends an error message: "*Error in < My command > : the base graphics system is not registered*" for any command related to the graphics package. I made a ticket on stackoverflow about it: https://stackoverflow.com/ questions/51242993/difference-between-r-3-4-4-and-r-3-5-1-in-r-api-for-c But nobody could explain why so far. And after reducing my code further, I am now enclined to think this is actually a bug. The code provided in stackOverflow is already reduced, but not minimal yet. Since then, I reduced it further to really ensure that it was not an interference from anything around it. So I removed the GUI and the callbacks. Here is a really minimal example attached. In its current form, the program just sends the command : par("mar") to R, and then the command dev.off() . With R.3.4.4, this program print as output what is expected. No error occured during evaluation of the command : *No error occured during eval of "par(\"mar\")"EXAMPLE #1 Output: EXAMPLE #1 Output: Result is: "5.1"Result is: "5.1"Result is: "5.1"Result is: "5.1"No error occured during eval of "dev.off()"Result is: "1"* But the exact same program with R.3.5.1 gives: *An error occured during eval of "par(\"mar\")"No error occured during eval of "dev.off()"Result is: "1"* The error that occured is not displayed here, since I removed the callbacks to fetch it, but it was: *Error in par("mar") : the base graphics system is not registered* I compiled Microsoft Visual C++ Compiler 15.0 (amd64), and uses 64bits version of R. But previously I also observed the same behovior with 32bits. I also tried re-installing R from scratch, without effect. I am using Windows 10, 64bits Registry variables PATH and R_HOME are correctly set and points to the appropriate version of R, installed in the default directory. I'd be glad to hear any ideas about potential fixes or workaround. Cheers, Andéol Evain
-- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics and Fax: 319-335-3017 Actuarial Science 241 Schaeffer Hall email: luke-tier...@uiowa.edu Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel