[Rcpp-devel] Different Rcout object for each translation unit

Iñaki Ucar iucar at fedoraproject.org
Mon Dec 3 19:33:58 CET 2018


Hi,

Rcout is defined in iostream/Rstreambuf.h as a static object. This
means that different translation units see a different Rcout, while
they see the same std::cout (I have a minimal package showing this if
needed). As a result, for example, one object allocated in a certain
.cpp cannot redirect the output of other object allocated in another
.cpp. Is there any solution to this (apart from putting everything in
a huge .cpp)?

Regards,
-- 
Iñaki Úcar


More information about the Rcpp-devel mailing list