From 7f1add83f74d733f2d5163241fa713944e9f6b44 Mon Sep 17 00:00:00 2001 From: david-cortes Date: Tue, 7 Jan 2025 19:17:24 +0100 Subject: [PATCH] [R] error out when trying to compile with msvc (#11148) --- R-package/src/xgboost_R.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R-package/src/xgboost_R.cc b/R-package/src/xgboost_R.cc index 0e7234a18708..68a45ba96780 100644 --- a/R-package/src/xgboost_R.cc +++ b/R-package/src/xgboost_R.cc @@ -27,6 +27,10 @@ #include "./xgboost_R.h" // Must follow other includes. +#ifdef _MSC_VER +#error "Compilation of R package with MSVC is not supported due to issues handling R headers" +#endif + namespace { /* Note: this class is used as a throwable exception.