Skip to content

Warn or error if Rcpp.h (and R.h) was included #142

@eddelbuettel

Description

@eddelbuettel

As discussed over in Rcpp in RcppCore/Rcpp#1402 we are seeing some side effects from some package including R.h and later including possible also Rcpp.h and then RcppEigen.h leaving some of the masking of R's own error() function as Rf_error() to not be effective so that it later clashes with Eigen function error().

In general, it is always cleanest to just include RcppEigen.h as it does take care of both the others. For RcppArmadillo this once lead to issues to that it (very early on) switch to an actual compile error. We may do that one day but for now it might be a good idea to at least warn from RcppEigen.h if the header guards for either or both of Rcpp and R are seen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions