Skip to content

Commit f0bae39

Browse files
kevinusheyeddelbuettel
authored andcommitted
fix issue with registration of 'stale' symbols (#939)
1 parent 0c9f683 commit f0bae39

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2019-02-11 Kevin Ushey <[email protected]>
2+
3+
* R/Attributes.R: better handle pre-existing RcppExports.cpp,
4+
RcppExports.R when calling compileAttributes()
5+
16
2018-12-26 Zhuoer Dong <[email protected]>
27

38
* vignettes/Rcpp-quickref.Rmd: Fix three bugs: use `Named()`, define

R/Attributes.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,15 @@ compileAttributes <- function(pkgdir = ".", verbose = getOption("verbose")) {
421421
if (!file.exists(rDir))
422422
dir.create(rDir)
423423

424+
# remove the old RcppExports.R file
425+
unlink(file.path(rDir, "RcppExports.R"))
426+
424427
# get a list of all source files
425428
cppFiles <- list.files(srcDir, pattern = "\\.((c(c|pp)?)|(h(pp)?))$", ignore.case = TRUE)
426429

430+
# don't include RcppExports.cpp
431+
cppFiles <- setdiff(cppFiles, "RcppExports.cpp")
432+
427433
# locale independent sort for stable output
428434
locale <- Sys.getlocale(category = "LC_COLLATE")
429435
Sys.setlocale(category = "LC_COLLATE", locale = "C")

inst/NEWS.Rd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
\item Changes in Rcpp Attributes:
1616
\itemize{
1717
\item A new plugin was added for C++20 (Dirk in \ghpr{927})
18+
\item Fixed an issue where 'stale' symbols could become registered in
19+
RcppExports.cpp, leading to linker errors and other related issues.
20+
(\ghit{733}; \ghit{934})
1821
}
1922
\item Changes in Rcpp Documentation:
2023
\itemize{

0 commit comments

Comments
 (0)