I've been strangling with an unresolved 'R_registerRoutines', 'R_useDynamicSymbols' note from R CMD check. I have read the relevant Section in the 'Writing R Extensions' and also checked various other posts online but the problem persists.
Summary of what I have done:
init.c file put in the src/ directory with the following content given in [1] below. This was done using tools::package_native_routine_registration_skeleton(".", "src/init.c", character_only = FALSE) (because with the default character_only = TRUE was not working).RcppExports.cpp in src/ and RcppExports.R in R/ given in [2] below.useDynLib(JMbayes, .registration = TRUE) in the NAMESPACE.Hence, any pointers would be welcome!
[1] init.c
[2] RcppExports.cpp
Promoting my comment to an answer.
The reason for the error is due to an interaction between RStudio and devtools on a Windows machine. Thus, what you are encountering is a false positive on the Registration of Native Entry points. If you submit your package to be checked on either r-hub.io or winbuilder you should receive the appropriately response.
Furthermore, the Registration of Native Entry points provided by tools:: package_native_routine_registration_skeleton() is now done automatically in Rcpp as of 0.12.12. Thus, there is no need to supply your own src/init.c. However, to engage this autocreation behavior, you must delete the src/init.c file and re-run Rcpp::compileAttributes(). This will lead to RcppExports.cpp being generated with the native registration registered at the end of the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With