[Rcpp-devel] RcppArmadillo and Rdefines

Charles Determan Jr deter088 at umn.edu
Tue Feb 24 19:30:24 CET 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20150224/3d3befe7/attachment.html>


More information about the Rcpp-devel mailing list