Xiao, On 3 September 2014 at 21:39, Xiao He wrote: | Hi Kevin, | | Yes, those extra includes are there because some functions taken from the MASS | package need these them. | | I rearranged the includes by placing #include <RcppArmadillo.h> before the ones | below, and was able to reduce the number of errors from 7 to 4. | | #include <R_ext/Linpack.h> | #include <R_ext/Applic.h> | #include <R_ext/Utils.h> | | Is it possible for you to take a look at the script below, which includes those | functions from MASS that require these includes? I am not sure what else needs | to be done. The errors seem to have to do with the fortran library. | | https://www.dropbox.com/s/ukjml693ta8r8gi/test2.cpp?dl=0
I just glanced at this for a few secs. Quick comments -- Remove R.h (pulled in via Rcpp which is pulled in from RcppArmadillo) -- think about using sort and QR from (Rcpp)Armadillo: because that is why we use Armadillo for -- if you can't make the error go away in one file, create two files: * one higher-level with RcppArmadillo calling * another lower-level SEXP-only set of functions with the code you borrowed from MASS Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel