[Rcpp-devel] Errors while compiling a script (seems to be related to Fortran)
Xiao He
praguewatermelon at gmail.com
Wed Sep 3 22:39:36 CEST 2014
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
Thank you!!
-Xiao
On Wed, Sep 3, 2014 at 6:49 PM, Kevin Ushey <kevinushey at gmail.com> wrote:
> Hi Xiao,
>
> I can reproduce the error -- but why do you have the includes as such,
> e.g.:
>
> #include <R.h>
> #include <float.h>
> #include <R_ext/Linpack.h>
> #include <R_ext/Applic.h> /* for the QR routines */
> #include <R_ext/Utils.h> /* for the *sort() routines */
> #include <stdio.h>
> #include <RcppArmadillo.h>
> #define BIG DBL_MAX
>
>
> My best guess is that you'll have to re-organize the includes, or put in
> some corresponding `#define` and `#undef`s to clean up some macro pollution
> that seems to be leaking out. Note that the file compiles successfully if
> you just include RcppArmadillo (but presumedly, in a real example, you want
> things from the other headers).
>
> Cheers,
> Kevin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140903/ac1bc134/attachment.html>
More information about the Rcpp-devel
mailing list