To use additional packages within the Rcpp ecosystem, the correct header file may not be Rcpp.h but Rcpp<PACKAGE>.h (as e.g. for RcppArmadillo). It typically needs to be imported and then the dependency is stated within
// [[Rcpp::depends(Rcpp<PACKAGE>)]]
Examples:
// Use the RcppAr...