Skip to content
Prev 1212 / 10988 Next

[Rcpp-devel] [Rd] Sections 5.8.1 and 5.8.2 of Writing R Extensions (LinkingTo)

On Wed, Oct 27, 2010 at 2:43 PM, Simon Urbanek
<simon.urbanek at r-project.org>wrote:

            
I did not tell the whole story here. Assume the packB depends on packC in
the sense that packB.dll links to packC.dll.
Then library(packB) will trigger library(packC), and this appears to have
the side effect of eliminating the need to place
the directories containing packB.dll and packC.dll on the search path.

If the library(packB) is not used in this situation there will be a failure
if instead of
cat(sytem.file("libs", package="packB") one uses cat(packB:::getLibs()),
where packB:::getLibs() is defined by system.file("libs",package="packB").

The lesson here (for me) is that packB:::getLibs() has the side-effect of
loading packB.dll,
and this will fail if the OS cannot find packC.dll (so the directory
containing the latter would
have to be placed on the search path if library(packB) is not used above).

Dominick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20101027/a36730df/attachment.htm>