Skip to content

Commit d0b4106

Browse files
authored
Merge pull request #1031 from RcppCore/feature/recommend_importfrom
recommend importFrom in Rcpp FAQ (closes #1030)
2 parents e77e79c + 1a4bc7a commit d0b4106

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2019-12-05 Dirk Eddelbuettel <[email protected]>
2+
3+
* vignettes/rmd/Rcpp-FAQ.Rmd (Rcpp): Add entry about "'dataptr' (or
4+
'enterRNGScope') not provided by Rcpp" recommending proper importFrom
5+
16
2019-12-03 Dirk Eddelbuettel <[email protected]>
27

38
* docker/ci/Dockerfile: Lighter builds as fewer Suggests:

vignettes/rmd/Rcpp-FAQ.Rmd

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,3 +1754,14 @@ Rcpp Modules \citep{CRAN:Rcpp:Modules}. Some more background on the linking
17541754
requirement is [in this SO
17551755
question](https://stackoverflow.com/questions/2424836/exceptions-are-not-caught-in-gcc-program).
17561756

1757+
## My package errors with "'dataptr' not provided by Rcpp"
1758+
1759+
If you see tests of your package fail with an error '... not provided by
1760+
Rcpp', frequently pointing at either `dataptr` or `enterRNGScope`, then the
1761+
\pkg{Rcpp} package may not have been initialized correctly. For your
1762+
package, it is generally recommended to have both `Imports: Rcpp` and
1763+
`LinkingTo: Rcpp` in the file `DESCRIPTION` combined with an explicit
1764+
`importFrom("Rcpp", "evalCpp")` in the file `NAMESPACE`. Doing so ensures
1765+
that this symbol is registered when your package is loaded by R, and as a
1766+
side-effect certain other \pkg{Rcpp} function identifiers will also be
1767+
resolved properly.

0 commit comments

Comments
 (0)