Skip to content

RcppParallel.h introduces conflicting macro variables on Mac #210

Description

@traversc

On Mac, RcppParallel.h introduces TRUE and FALSE macro variables brought in from system headers (mach/boolean.h) that conflict with TRUE and FALSE definitions from R headers.

If RcppParallel.h is added to <package_name>_types.h, it then breaks RcppExports.cpp.

A simple fix could be to undef TRUE and FALSE in RcppParallel.h. Reproducible example: https://github.com/traversc/mactest/blob/main/src/mactest_types.h#L9

Alternatively, TRUE and FALSE macros could be re-assigned to something else like R_TRUE and R_FALSE in RcppExports.cpp

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