Skip to content

Commit 1684878

Browse files
committed
add entry on include order (closes #1148)
1 parent 9633169 commit 1684878

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

vignettes/pdf/Rcpp-FAQ.pdf

154 KB
Binary file not shown.

vignettes/rmd/Rcpp-FAQ.Rmd

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,7 @@ statically on Windows putting a limitation on the use of `stop()` from within
17531753
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).
1756-
1756+
17571757
## My package errors with "'dataptr' not provided by Rcpp"
17581758

17591759
If you see tests of your package fail with an error '... not provided by
@@ -1765,3 +1765,13 @@ package, it is generally recommended to have both `Imports: Rcpp` and
17651765
that this symbol is registered when your package is loaded by R, and as a
17661766
side-effect certain other \pkg{Rcpp} function identifiers will also be
17671767
resolved properly.
1768+
1769+
## On macOS, 'no function function for call to `R_lsInternal`'
1770+
1771+
In issue [#1148](https://github.com/RcppCore/Rcpp/issues/1148) an error due
1772+
to overeager includes was reported. Including `Rinternals.h` along with the
1773+
(macOS-only) `mach/boolean.h` lead to linker error as `mach/boolean`
1774+
redefines `TRUE` leading to bad interactions with the `Rboolean` enum type. A
1775+
very simple solution is to be more careful and conservative with `#include`
1776+
files and a) have `#include <mach/boolean.h>` appear first and b) skip
1777+
`#include <Rinternals.h>` as Rcpp brings it in anyway.

0 commit comments

Comments
 (0)