Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2019-11-20 Dirk Eddelbuettel <edd@debian.org>

* R/Attributes.R: Test for and report unavailable 'LinkingTo' package

2019-11-19 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll minor version
Expand Down
5 changes: 5 additions & 0 deletions R/Attributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,11 @@ sourceCppFunction <- function(func, isVoid, dll, symbol) {
# otherwise check for standard Rcpp::interfaces generated include
else if (!pluginsOnly) {
pkgPath <- find.package(package, NULL, quiet=TRUE)
if (length(pkgPath) == 0) {
stop(paste("Package '", package, "' referenced from ",
"LinkingTo directive is not available.", sep=""),
call. = FALSE)
}
pkgHeader <- paste(package, ".h", sep="")
pkgHeaderPath <- file.path(pkgPath, "include", pkgHeader)
if (file.exists(pkgHeaderPath)) {
Expand Down