问题
I have been building an r-package that runs RcppParallel and calls nloptr from the cpp in parallel. Currently, the package will not build as it can't find the 'nloptrAPI.h' file.
The build log outputs: * checking dependencies in R code ... NOTE Namespaces in Imports field not imported from: ‘RcppArmadillo’ ‘nloptr’
My question is if there is a simple fix for this. Or if I would have to rewrite the function to call 'nlopt' from the cpp version and add a 'makevars' file to the package.
The src only contains my written functions and the generated RcppExports.
来源:https://stackoverflow.com/questions/51302343/r-packages-with-rcpp-and-nloptr