Undefined reference errors when including Rcpp.h
问题 I am using 64bit Ubuntu, and I am trying to write C++. I discovered if I use #include <Rcpp.h> , I don't even need to call any functions in the R namespace, and I would already receive undefired reference errors: obj/x.o: In function `Rcpp::Rstreambuf<true>::xsputn(char const*, long)': /usr/local/lib/R/site-library/Rcpp/include/Rcpp/iostream/Rstreambuf.h:61: undefined reference to `Rprintf' obj/x.o: In function `Rcpp::Rstreambuf<false>::xsputn(char const*, long)': /usr/local/lib/R/site