[Rcpp-devel] RcppArmadillo and Rdefines
William Dunlap
wdunlap at tibco.com
Tue Feb 24 21:01:03 CET 2015
Do you really need the macros like GET_LENGTH that are defined in
#include <Rdefines.h>
? It looks like they are meant to ease porting of C code written for S or
S+,
but very little code these days is written for S or S+ and certainly not
Rcpp
code.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Tue, Feb 24, 2015 at 10:30 AM, Charles Determan Jr <deter088 at umn.edu>
wrote:
> Greetings,
>
> I have run in to an error when compiling an R package that has the
> following headers in the only cpp file at the moment:
>
> #include <string>
> #include <iostream>
> #include <cmath>
>
> #define R_NO_REMAP
>
> #include <R.h>
> #include <Rinternals.h>
> #include <Rdefines.h>
>
> Now, I am also trying to use RcppArmadillo with:
>
> #include <RcppArmadillo.h>
> // [[Rcpp::depends(RcppArmadillo)]
>
> However, when I try and build the package, it errors out with a bunch of
> errors such as:
>
> /usr/include/c++/4.8/bits/fstream.tcc:824:60: error: macro "length" passed
> 4 arguments, but takes just 1
>
> which is repeated multiple times on different lines. I haven't included
> the entire output as it is rather lengthly but could provide if it would
> help further. I tried searching for help but the closest I found was this
> previous post (
> http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2013-February/005325.html)
> but the R_NO_REMAP hasn't helped here. I suspect something must be
> conflicted between the R headers and RcppArmadillo because it works just
> fine if I only use Rcpp.h (but I want to use RcppArmadillo). Any thoughts?
>
> Regards,
>
> --
> Dr. Charles Determan, PhD
> Integrated Biosciences
>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20150224/ded8244e/attachment.html>
More information about the Rcpp-devel
mailing list