<div dir="ltr">Do you really need the macros like GET_LENGTH that are defined in<div>   #include <Rdefines.h></div><div>?  It looks like they are meant to ease porting of C code written for S or S+,</div><div>but very little code these days is written for S or S+ and certainly not Rcpp</div><div>code.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">Bill Dunlap<br>TIBCO Software<br>wdunlap <a href="http://tibco.com" target="_blank">tibco.com</a></div></div>
<br><div class="gmail_quote">On Tue, Feb 24, 2015 at 10:30 AM, Charles Determan Jr <span dir="ltr"><<a href="mailto:deter088@umn.edu" target="_blank">deter088@umn.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Greetings,<div><br></div><div>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:</div><div><br></div><div>#include <string></div><div>#include <iostream></div><div>#include <cmath></div><div><br></div><div>#define R_NO_REMAP</div><div><br></div><div>#include <R.h></div><div>#include <Rinternals.h></div><div>#include <Rdefines.h></div><div><br></div><div>Now, I am also trying to use RcppArmadillo with:</div><div><br></div><div>#include <RcppArmadillo.h></div><div>// [[Rcpp::depends(RcppArmadillo)]</div><div><br></div><div>However, when I try and build the package, it errors out with a bunch of errors such as:</div><div><br></div><div>/usr/include/c++/4.8/bits/fstream.tcc:824:60: error: macro "length" passed 4 arguments, but takes just 1</div><div><br></div><div>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 (<a href="http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2013-February/005325.html" target="_blank">http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2013-February/005325.html</a>) 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?</div><div><br></div><div>Regards,</div><span class="HOEnZb"><font color="#888888"><div><div><br></div>-- <br><div><div dir="ltr">Dr. Charles Determan, PhD<br>Integrated Biosciences<br></div></div>
</div></font></span></div>
<br>_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br></blockquote></div><br></div>