Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.31.0202061014310.23308-100000@gannet.stats>
Date: 2002-02-06T10:19:55Z
From: Brian Ripley
Subject: dyn.unload
In-Reply-To: <Pine.LNX.4.33.0202061106050.11884-100000@florence>

On Wed, 6 Feb 2002, Christian Hennig wrote:

> Dear list,
>
> I want to write a package which loads a C library dynamically.
>
> It seems that it is not possible to unload the library using dyn.unload
> (for example with detach, .Last.lib)
> if it has been loaded with library.dynam in .First.lib.
>
> dyn.unload in my experience only unloads libraries
> successfully which have been loaded by dyn.load.

And as library.dynam calls dyn.load, that includes those loaded by
library.dynam!  Are you calling dyn.unload with the correct argument?

> So how to unload libraries which were loaded in .First.lib (dyn.load seems
> to be discouraged for .First.lib)?

There is a working example in library(tcltk) under Windows.  You need
also to remove the entry in .Dyn.libs for library.dynam to work on
the same package again.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._