diff -Nru orig/rstanarm/src/init.cpp patched/rstanarm/src/init.cpp
--- orig/rstanarm/src/init.cpp	2023-02-07 16:40:42.000000000 +0100
+++ patched/rstanarm/src/init.cpp	2024-02-16 14:59:14.495758700 +0100
@@ -32,8 +32,10 @@
   {NULL, NULL, 0}
 };
 
-void attribute_visible R_init_rstanarm(DllInfo *dll) {
-  // next line is necessary to avoid a NOTE from R CMD check
-  R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
-  R_useDynamicSymbols(dll, TRUE); // necessary for .onLoad() to work
+extern "C" {
+  void attribute_visible R_init_rstanarm(DllInfo *dll) {
+    // next line is necessary to avoid a NOTE from R CMD check
+    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
+    R_useDynamicSymbols(dll, TRUE); // necessary for .onLoad() to work
+  }
 }
diff -Nru orig/rstanarm/src/rstanarm-win.def patched/rstanarm/src/rstanarm-win.def
--- orig/rstanarm/src/rstanarm-win.def	2023-02-07 16:40:42.000000000 +0100
+++ patched/rstanarm/src/rstanarm-win.def	2024-02-16 14:59:25.169266000 +0100
@@ -1,3 +1,11 @@
 LIBRARY rstanarm.dll
 EXPORTS
-  
+    R_init_rstanarm
+    _rcpp_module_boot_stan_fit4bernoulli_mod
+    _rcpp_module_boot_stan_fit4binomial_mod
+    _rcpp_module_boot_stan_fit4continuous_mod
+    _rcpp_module_boot_stan_fit4count_mod
+    _rcpp_module_boot_stan_fit4jm_mod
+    _rcpp_module_boot_stan_fit4lm_mod
+    _rcpp_module_boot_stan_fit4mvmer_mod
+    _rcpp_module_boot_stan_fit4polr_mod
