Reputation: 1652
I am trying to compile an R package that contains both C++ and Fortran code using Rcpp. The compilation works perfectly fine, but the package can't dyn.load
the shared object, throwing the error:
undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE
Applying a c++filt
to this gives:
vtable for __cxxabiv1::__si_class_type_info
The package is the sf_onefolder
branch from here: https://github.com/blowfish711/PEcAnRTM.
I thought this might be because of some compatibility (or lack thereof) with the latest R version, but an older R version on a different system gives the same error.
I don't necessarily even need an answer to this as much as a way to debug it. I've used gdb
with R scripts in the past, but I'm at a loss about how to approach this. Any suggestions are welcome!
Upvotes: 0
Views: 240
Reputation: 309
I've had similar issues when trying to call Fortran code using the Rcpp interface. I solved them by building an R package (see here 1 for the source). Hope this helps.
Upvotes: 0
Reputation: 368389
What you post is not a minimally reproducible example but the first thing that comes to mind is different headers / signatures and eg the need to use
extern "C"
before C++ functions called from C.
You may need to something similar. It is hard to say more but there are of course package uses C++ and Fortran together.
Upvotes: 2