Rcpp - sourceCpp - undefined symbol
问题 I'm using Rcpp to get self-written C++ into R. I have the 3 follwing C++ files header.h #include <Rcpp.h> int x(); def.cpp #include <Rcpp.h> #include "header.h" // [[Rcpp::export]] int x() { return 0; } call.cpp #include <Rcpp.h> #include "header.h" // [[Rcpp::export]] int callx(){ return x(); } After compiling successfully I can call the function callx() as well as x() from R R> callx() [1] 0 R> x() [1] 0 But when I try to source the file call.cpp using cppSource I get this error > Rcpp: