bnosac / ruimtehol

R package to Embed All the Things! using StarSpace
Mozilla Public License 2.0
99 stars 13 forks source link

Avoid conflict with windows headers (abort). #41

Closed kalibera closed 4 months ago

kalibera commented 4 months ago

This minimal fix resolves a conflict with Windows headers (observed with LLVM/aarch64 toolchain, but could be related to newer mingw-w64, which will be soon used also on x86_64).

The problem is that the definition of macro "abort" causes compilation of headers included via windows.h to fail. This minimal fix/hack includes windows.h before the definition. It might still be worth to re-structure the code to systematically include system headers before R headers and R definitions, as recommended by Writing R Extensions.

jwijffels commented 4 months ago

Hello Tomas. Thanks for the upstream fixes. I'll incoporate it already and make the changes to remove this compliance.h file and change the abort statements directly in the .cpp files making sure including Rcpp.h is included after the system headers. Thanks!