Bug found for combining RcppArmadillo.h with R_ext/Applic.h; fixed by separating the C API calls by header and implementation.