[Rcpp-devel] Rcpp::stop crashes RGui and RStudio under Windows
JJ Allaire
jj.allaire at gmail.com
Fri Nov 30 16:20:32 CET 2012
Hi Dieter,
I think we've narrowed down the problem to the fact that Mingw won't allow
C++ exceptions to cross DLL boundaries unless all libraries are linking to
a shared version of libgcc. See the gcc 4.6.2 release notes for details:
http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.6.2-1/
Linking to a shared version of libgcc is the default behavior for C++,
however it looks like the R package build process overrides this in the
gnuwin32 etc/Makeconf as follows:
DLLFLAGS+= -static-libgcc
LINKFLAGS+= -static-libgcc
I don't know if there is any way for a package to override this (nor
whether that would be desirable in other dimensions that we're not aware
of).
So, we need to investigate how we can prevent exceptions from ever crossing
DLL boundaries. In the meantime you can use the explicit exception handling
code that Dirk posted, but of course we are very keen to not have to
require this boilerplate code on Windows. More later....
J.J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20121130/50200114/attachment-0001.html>
More information about the Rcpp-devel
mailing list