Here are some suggested changes (under Windows) that will not affect <br>existing users but may help to prevent clashes with other packages in the future.<br><br>1. RcppExport is not defined the way it used to be under Windows, but<br>
there are situations where the old definition is convenient. For example,<br>it reduces the size of package DLL's the are not intended to be used<br>by other packages (the most common situation).<br><br>A simple work-around is to define RcppExportFinal the old way, using<br>
something like:<br><br>#if defined(mingw32) || defined(WIN32)<br>#define RcppExportFinal extern "C" __declspec(dllexport)<br>#else<br>#define RcppExportFinal extern "C"<br>#endif<br><br>Let me know if/when you implement this so it does not clash with<br>
the same definition in my package.<br><br>2. The current default behavior where a static lib is used<br>(libRcpp.a) is probably the most convenient and portable, but<br>there are situations where it is useful to link directly to Rcpp.dll.<br>
<br>To facilitate this one of the path functions in RcppLdpath.R<br>needs to be changed slightly for the case static=FALSE:<br><br>RcppLdFlags <- function(static=staticLinking()) {<br> rcppdir <- RcppLdPath()<br>
if (static) { # static is default on Windows and OS X<br> flags <- paste(rcppdir, "/libRcpp.a", sep="")<br> #if (.Platform$OS.type=="windows") {<br>
# flags <- shQuote(flags)<br> #}<br> } else { # else for dynamic linking<br> flags <- paste("-L", rcppdir, " -lRcpp", sep="") # baseline setting<br>
if((.Platform$OS.type == "windows")) {<br> flags <- paste(rcppdir, "s/Rcpp.dll",sep="")<br> }<br> if ((.Platform$OS.type == "unix") && # on Linux, we can use rpath to encode path<br>
(length(grep("^linux",R.version$os)))) {<br> flags <- paste(flags, " -Wl,-rpath,", rcppdir, sep="")<br> }<br> }<br> invisible(flags)<br>}<br><br>Dominick<br>
<br><br>