[R] Shared library loading in Win R 1071 and previous Win R versions

Prof Brian D Ripley ripley at stats.ox.ac.uk
Sat Aug 30 18:09:04 CEST 2003


You probably need to recompile the DLL: have you tried that?

On Sat, 30 Aug 2003, Paul Y. Peng wrote:

> I recently upgraded R from rw1051 to rw1071 on a Win98se system and
> surprisingly found my DLL library does not work any more. When I
> tried to load the dll file by dyn.load("my.dll"), I got the following
> message:
>
>   Error in dyn.load(x, as.logical(local), as.logical(now)) :
>           unable to load shared library "C:/temp/my.dll":
>     LoadLibrary failure:  A device attached to the system is not
> functioning.
>
> I cannot figure out what is meant by this message.

I think it is from an old version of Windows?  (Windows XP and 2000 are
usually a lot more informative.)  It probably means that R.dll does not
contain what your DLL expected, which is not surprising if you did not
recompile it.

> The DLL library has
> been working up to version rw1062. I checked CHANGES in rw1071 directory
> did not find anything related to loading a shared library. Can anyone
> enlighten me on this?

The NEWS file might enlighten you, BTW: CHANGES is only about
Windows-specific changes.  No one has ever said that a DLL compiled for one
version of R will work for any other, although it is likely to work between
patch levels (1.7.0 to 1.7.1, for example).

> Since rw1071 does not work,

It is *your* code that does not work.

> I am thinking to install rw1062 instead.
> However, the "old" link in
>
>    http://lib.stat.cmu.edu/R/CRAN/bin/windows/base/
>
> does not work. Is this right place to get an old version of R?

It does on the master CRAN site, but gets you to rw1070.  It also seems to
work on that mirror.  The old link in the old area does not work, nor I
suspect is it intended to.

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list