Skip to content

problem exporting Rcpp functions #13

Description

@lukas-rokka

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions