Thanks JJ,

That worked perfectly.

On 2 June 2016 at 20:25, JJ Allaire <jj.alla...@gmail.com> wrote:

> 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:
>
> src/foo_types.hpp
>
> And put your #define macros there.
>
>
>
> On Thu, Jun 2, 2016 at 3:32 AM, Scott Ritchie <sritchi...@gmail.com>
> wrote:
>
>> Hi all,
>>
>> I would like to set my own Armadillo #define macros (i.e. some of those
>> listed http://arma.sourceforge.net/docs.html#config_hpp) in an R package
>> I have developed.
>>
>> The instructions there are to put their definitions before the include
>> statement to armadillo.h (or in this case RcppArmadillo.h).
>>
>> 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.
>>
>> Kind regards,
>>
>> Scott Ritchie
>>
>> _______________________________________________
>> Rcpp-devel mailing list
>> Rcpp-devel@lists.r-forge.r-project.org
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>>
>
>
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to