getDLLRegisteredRoutines.DLLInfo(dll, addNames = FALSE)

I’m having troubles compiling an R package that uses Stan. This is the error I’m getting:

Error in getDLLRegisteredRoutines.DLLInfo(dll, addNames = FALSE) : 
  must specify DLL via a “DLLInfo” object. See getLoadedDLLs()

I tried running:

roxygen2::roxygenise(clean=TRUE)

and

devtools::clean_dll()
roxygen2::roxygenise()

Any suggestions for how to fix this?

This usually indicates that the package is missing a useDynLib statement in the NAMESPACE file (example in rstan)

Other than that, we’d need a reproducible example to debug