Closed 1e100 closed 3 years ago
Thanks. So, this is the first time i hear about STRICT_R_HEADERS, and I'm not following. Can you please explain what the problem is in regards to matrixStats. Also, you mention Rcpp - where does that come into the picture?
My bad, meant to file this elsewhere. You don't use Rcpp.
Without this define Rcpp will export some macros that are very likely to clash with third party code such as e.g.
Calloc
andFree
. One example is Protocol Buffers which people use to store data to disk. In Protocol Buffers, for example,include/google/protobuf/arena_impl.h
would like to be able to define a member function namedFree
, and it cannot do so ifRS.h
is already in scope. That's very problematic.Needless to say, this problem is not limited to Protocol Buffers. Anything that would like to define functions that clash with these very "clashy" macros will have problems. Sometimes those problems can be awkwardly and temporarily solved by ordering the header includes, but mostly they're a thorn in the side. To make matters worse the error produced by the compiler is incomprehensible, and therefore less skilled developers may not be able to diagnose the root cause.
See more discussion here: https://github.com/RcppCore/Rcpp/issues/898