I want to make a C++ function aviliable to R with the // [[Rcpp::export]] command. This does not work when using the rstan.package.skeleton. I get the error "object '[name of the rcpp function]' not found". It appears to be some problem with registering the routine.
However, if I remove lines 16:20 from src\init.cpp the registration works. Here is the code from those lines:
void attribute_visible R_init_sem5r1c(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
}
What do these lines of code actually do and are they safe to remove?
I want to make a C++ function aviliable to R with the
// [[Rcpp::export]]command. This does not work when using the rstan.package.skeleton. I get the error "object '[name of the rcpp function]' not found". It appears to be some problem with registering the routine.However, if I remove lines 16:20 from src\init.cpp the registration works. Here is the code from those lines:
What do these lines of code actually do and are they safe to remove?