-
-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Description
I got my hands on a SPARC machine and I've detected that a std::endl
issued with Rcpp::Rcout
is not printed. I've done the following:
- Create a test package with
Rcpp::Rcpp.package.skeleton("test")
. - Modify
src/rcpp_hello_world.cpp
as follows:
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
void rcpp_hello_world() {
Rcpp::Rcout << "hello world!" << std::endl;
Rcpp::Rcout << "another hello world!" << std::endl;
}
- Build the package with
R CMD build test
. - And in the SPARC station...
-bash-3.2$ R CMD INSTALL test_1.0.tar.gz
* installing to library '/export/home/***/R/sparc-sun-solaris2.10-library/3.3'
* installing *source* package 'test' ...
** libs
/opt/csw/bin/g++-5.2 -I/opt/csw/lib/R/include -DNDEBUG -I/opt/csw/include -I"/export/home/***/R/sparc-sun-solaris2.10-library/3.3/Rcpp/include" -fPIC -O2 -pipe -fno-omit-frame-pointer -mcpu=v9 -Wa,-xarch=v8plus -c RcppExports.cpp -o RcppExports.o
/opt/csw/bin/g++-5.2 -I/opt/csw/lib/R/include -DNDEBUG -I/opt/csw/include -I"/export/home/***/R/sparc-sun-solaris2.10-library/3.3/Rcpp/include" -fPIC -O2 -pipe -fno-omit-frame-pointer -mcpu=v9 -Wa,-xarch=v8plus -c rcpp_hello_world.cpp -o rcpp_hello_world.o
/opt/csw/bin/g++-5.2 -shared -mcpu=v9 -Wa,-xarch=v8plus -L/opt/csw/lib -o test.so RcppExports.o rcpp_hello_world.o
installing to /export/home/***/R/sparc-sun-solaris2.10-library/3.3/test/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (test)
-bash-3.2$ Rscript -e "test::rcpp_hello_world()"
hello world!another hello world!-bash-3.2$
No newlines! (I've verified that a simple C++ program using std::cout
prints the newlines).
Metadata
Metadata
Assignees
Labels
No labels