<div dir="ltr">If you create a file called pkgname_types.hpp and put it in your src directory it will be added to RcppExports.cpp ahead of RcppArmadillo.h. e.g. if your package is named foo then create:<div><br></div><div>src/foo_types.hpp</div><div><br></div><div>And put your #define macros there.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 2, 2016 at 3:32 AM, Scott Ritchie <span dir="ltr"><<a href="mailto:sritchie73@gmail.com" target="_blank">sritchie73@gmail.com</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">Hi all,<br><br>I would like to set my own Armadillo #define macros (i.e. some of those listed <a href="http://arma.sourceforge.net/docs.html#config_hpp" target="_blank">http://arma.sourceforge.net/docs.html#config_hpp</a>) in an R package I have developed.<br><br>The instructions there are to put their definitions before the include statement to armadillo.h (or in this case RcppArmadillo.h). <br><br>However, the first file to compile is RcppExports.cpp, which has `#include <RcppArmadillo.h>` at the top of the file, so my preprocessor macros in my source files are ignored when compiling. <br><br>Kind regards,<br><br>Scott Ritchie</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" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br></blockquote></div><br></div>